do-while
if-else
for
while
break
continue
return
None of these
switch
do while
TRUE
FALSE
Return
GOTO
Switch
exit
is executed only once if the condition is true.
is also known as entry-controlled loop.
is executed at least once if the condition is false.
is unconditional looping statement..
0
Infinitely
1
Variable
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
for (i=1; i < 20; i++) printf (“k”);
for (i=1; i = 20; i++) printf (“k”);
for (i=0; i < 20; i++) printf (“k”);
for (i=0; i <= 20; i++) printf (“k”);
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.
exit()
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
syntax error