answersLogoWhite

0

it is used often in the context:

if(condition is true) {following statements will be executed};

else[meaning that if the above condition is not true] {following statements will not be executed}

for example:

if(x == 3) {cout<< "condition is true"; y=4;}

else {cout<< "condition is not true"; y=x-1}

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Which statement in C plus plus is used to implement a decision structure in its simplest form-that of choosing between two alternatives?

if (condition) statement else statement;


Syntax of nested if in c?

If(condition) { if-else statement; } else { if-else statement; }


Which statement is not frequently used in C plus plus?

The goto statement.


What are the usage of IF statement in C plus plus program?

Conditional execution. if (1==2) puts ("Wow, 1==2"); else puts ("No, 1&lt;&gt;2")


What is else if in C programming language?

Statements. Typical usage: if (&lt;condition&gt;) &lt;statement&gt;; else &lt;statement&gt;;


Why you use if and else statement in c language program?

There is no "elseif" statement in C. You can only use "else" and "if" separately. This is a good reason for switch/case/break.


What is the deffernce of the switch statement and the if statement in c plus plus?

If statement is single selection statement,whereas the switch statement is multiple selective.


Can you see a programme of if syntax in c plus plus?

My self Dhilib... it is a simple query. if statement is a basic control statement. mostly it used in all the languages. also in c plus plus syntax: if(test condition) { true statements; } else { false-statements; } Example: void main() { int a,b; a=54; b=65; if(a&gt;b) { cout&lt;&lt;" a value is big"; } else { cout&lt;&lt;"b value is big"; } }


What is the format of if statement in c plus plus?

Syntax:if (expression)statement;[elsestatement;]The expression must evaluate to a boolean value, where zero is false and all non-zero values are true. The statement (including the optional else statement) may be simple or compound, and may include a nested if statement. When the expression evaluates true, the first statement is invoked. If an else statement is provided, it is only executed when the expression evaluates false. After the appropriate statement is invoked, execution passes to the statement that immediately follows the entire if statement.


Basic control structure available in c plus plus?

The basic control structure in C++ is the if statement.


A c plus plus statement that invokes a function is known as?

...a function call.


How do you apply if in char type in c plus plus?

char x = "C"; if(char == 'C') { } else { }