switch
while
do while
for
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
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 final value of x when the code is executed?
int x; for(x=0; x<10; x++) {}
10
9
is executed only once if the conditions is true
is also known as entry-controlled loop
is executed at least once if the conditions is false
the unconditional loop
break
exit(0)
abort()
All of the mentioned
Loop statement
Conditional Statement
Block Statement
All of the above
What will be the output of following program?
int main() { for(int c=1;c<5;++c); printf(“%d”,c); }
5
6
12345
For loop
While loop
do-while loop
None of the mentioned
it is assumed to be present and taken to be false
it is assumed to be present and taken to the true
it result in a syntax error
execution will be terminated abruptly
For
Do while
do For
While
do-while
goto
for loop
while loop
None of the above
none of the above
for (int i = 0; i < 10; i++)
for i = 0 to 10 step 1
for (i = 0; i < 10; i++)
for (i < 10; i++)
How many times will the following loop execute?
int j; for(j = 1; j <= 10; j = j-1) printf("INFOMAX");
Forever
Never