Question: What will be output when you will execute following c code?#include<stdio.h>
void main(){
int a=5,b=10,c=1;
if(a&&b>c){
printf("cquestionbank");
}
else{
break;
}
}
A
B
C
D
E
cquestionbank
B
It will print nothing
C
Run time error
D
Compilation error
E
None of the above
Note: Keyword break is not syntactical part of if-else statement. So we cannot use break keyword in if-else statement. This keyword can be use in case of loop or switch case statement.
Hence when you will compile above code compiler will show an error message: Misplaced break.