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
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
Login to add comment