do-while
if-else
for
while
TRUE
FALSE
Character
Integer
Float
enum
What would be value of j after the following is executed?
k=17; j=6; if (k < 10) j=8; j=j+1; j=j+2;
8
9
7
10
What will be output after compilation and execution of the following code?
int main() { int array[3]={5}; int i; for (i=0;i<=2;i++) printf("%d ",array[i]); return 0; }
5 garbage garbage
5 0 0
0 0 0
5 5 5
What is the value of r after this code is executed?
r=2; k=8; if (r>3 || k>6 && r<5 ||k>10) r=9; else r=6
2
6
All of the following are valid expressions in C.
What will be the output of the following program?
main() { int x = 5; while ( x = = 1) x = x -1; printf ( “ %d\n”, x); }
5
4
0
syntax error
What will be output if you will compile and execute the following C code?
int main(){ int check=2; switch(check){ case 1: printf("D.W.Steyn"); case 2: printf(" M.G.Johnson"); case 3: printf(" Mohammad Asif"); default: printf(" M.Muralidaran"); } return 0; }
M.G.Johnson
M.Muralidaran
M.G.Johnson Mohammad Asif M.Muralidaran
Compilation error
How many times "IndiaBIX" is get printed?
int main() { int x; for(x=-1; x<=10; x++) { if(x < 5) continue; else break; printf("IndiaBIX"); } return 0; }
Infinite times
11 times
0 times
10 times