answersLogoWhite

0


Best Answer

I believe it would be an if statement INSIDE of another if statement.

So, ex. if one condition is TRUE, then the 2nd if statement is executed.

could look like:

if (colour ==red)

if (leaf == maple)

cout<< "OMG Canada!";

else

cout<< "Fail.";

get it?

of course, it can be beneficial sometimes beyond situations where you can simply use the && or operators as well.. but i have PDENG.

hope that helps

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the definition of nested IF statement?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the if statement that appears inside another if statement?

nested if Statement


What is the definition of 'nested' in C programming?

In C a structure within a structure is called nested. For example, you can embed a while loop in another while loop or for loop in a for loop or an if statement in another if statement.


When do you use the nested if?

we use "nested if" if we have to test a large number of possibilities and trials i an if statement.


Syntax of nested if in c?

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


Can you have nested switch statement inc language?

yes,we can


Would you be correct in saying that in an nested if statement it would read ----if and it is and it is then do this--- else do this?

What you are asking would be not be a nested if then else statement, in pseudocode what you are asking would be:if condition thendo thiselsedo that[this is pseudo code because the 'and' would be rendered differently in other languages and there potentially would be statement terminators, etc]A nested if statement would be:if condition1 thenif condition2 thendo thiselsedo thiselsedo thatThe second if statement is nested within the first one, clearly the nesting can go on quite deeply.


In which of the following scenarios would you need to use a nested IF statement?

You use a nested if when the condition is dependent upon another condition. For example: if (ptr != nullptr) { // ptr is non-null -- test the value it refers to if (ptr* == 0) { // the value pointed to by ptr is zero } else { // the value pointed to by ptr is non-zero } } In this case, the alternative to a nested if creates an inefficiency: if (ptr != nullptr &amp;&amp; *ptr == 0 ) { // ptr is valid and refers to the value zero } else if (ptr != nullptr) { // ptr is valid and refers to a non-zero value } In this example, the expression &quot;ptr != nullptr&quot; is evaluated twice when ptr is valid and refers to a non-zero value. The nested if only evaluates this expression one time.


What is nested macro calls?

Nested macro calls refer to the macro calls within the macros. A macros is available within other macro definitions also. In the scenario when a macro call occurs, which contains another macro call, the macro processor generates the nested macro definition as text and places it on the input stack. The definition of the macro is then scanned and the macro processor complies it.


What is linear nested IF statement?

Its when a field is being tested for various values and different action is to be taken for each value.


What is nesting in C programming?

Nesting can be a very handy tool in C++, but should be avoided if possible.C++ gives us If statements, For loops and many other things. These can be nested. For example:A nested If statement://outer if statementIf( this is true ){//nested if statementif( this is also true ){//do something}else{//do something else}}


Definition of closure in dbms?

In Relational algebra allows expressions to be nested, just as in arithmetic. This property is called closure.


What is the definition of parent function?

When a function is nested inside another function, the outer one is the parent, the inner is the child.