Ans. The nested if is an 'if statement used within another it statement
use if-else-if' then an 'if statement is used within the 'else part of
Ans. A statement that includes a set of statements within it under the open
REVIEW INSIGHT
(a) What is the similarity between 'if-else-if and 'nested in
way, 'nested ir is similar to an 'if-else if
(b) What do you mean by compound statement?
ICSE WU
I. Multip
Tick
1. In
(ICSL
curly brackets is said to be a compound
(c) Rewrite the following if statement by using ternary operator
if(a<100)
if(a<10)
Answers
Answer:
C – If..else, Nested If..else and else..if Statement with example
BY CHAITANYA SINGH | FILED UNDER: C-PROGRAMMING
In the last tutorial we learned how to use if statement in C. In this guide, we will learn how to use if else, nested if else and else if statements in a C Program.
C If else statement
Syntax of if else statement:
If condition returns true then the statements inside the body of “if” are executed and the statements inside body of “else” are skipped.
If condition returns false then the statements inside the body of “if” are skipped and the statements in “else” are executed.
if(condition) {
// Statements inside body of if
}
else {
//Statements inside body of else
}
Flow diagram of if else statement
C If else flow diagram
Answer:
Explanation:
IDK