saving . . . saved else if statement has been deleted. else if statement has been hidden .
else if statement
Title
Question
in the below coding,
if(c>=20)
printf("c is grater than or equal to  20");
else if(c<=20 && c>=10)
printf("c is between 10 and 20");
the value of c is 20,output will be "c is grater than or equal to  20",why the else if (qualifies for the same condition) does not get executed

C-and-Cpp If-And-Else-If-statement 00-01 min 10-20 sec 29-02-20, 3:40 p.m. palanithangam

Answers:

Once the if(Condition1) block is executed, the remaining all else if condition will not be checked by any compiler.......

so it will not consider further
29-02-20, 3:55 p.m. itt513


Log-in to answer to this question.