COMPUTER PROGRAMMING FUNDAMENTALS
WHAT IS PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
True
|
|
False
|
|
Either A or B
|
|
None of the above
|
Detailed explanation-1: -9.5 Nested If Statements You can place or nest an If statement inside another If statement. When you nest If statements, you can check for a condition only when another condition is found to be true.
Detailed explanation-2: -There may be a situation when you want to check for another condition after a condition resolves to true. In such a situation, you can use the nested if construct.
Detailed explanation-3: -If an if statement appears inside another if statement (single or block) it is called a nested if statement.
Detailed explanation-4: -The if-else statement is used to execute both the true part and the false part of a given condition. If the condition is true, the if block code is executed and if the condition is false, the else block code is executed.