Which statement is used to skip the current iteration in a loop?
What is the default value of a loop control variable in C?
Which loop executes the body at least once, regardless of the condition?
What is the keyword to exit prematurely from current loop only?
What is the keyword to exit from a loop prematurely?
Which of the following is TRUE about switch statements in C?
switch can evaluate expressions
case labels must be strings
You cannot use break in switch
Which part(s) of a for loop are optional in C?
Can you place a function call inside the initialization part of the for loop?
C
for (printf("Init\n"); i < 3; i++) {
printf("Body\n");
No, only variable declarations are allowed
Only arithmetic expressions are allowed
Yes, function calls are valid
#include <stdio.h>
int main()
{
int i = 1024;
for (; i; i >>= 1)
printf("GeeksQuiz");
return 0;
}
How many times will GeeksQuiz be printed in the above program?
The program will show compile-time error
What will be the outpu tof the following program?
C
# include <stdio.h>
int main()
{
int i = 0;
for (i=0; i<20; i++)
{
switch(i)
{
case 0:
i += 5;
case 1:
i += 2;
case 5:
i += 5;
default:
i += 4;
break;
}
printf("%d ", i);
}
return 0;
}
There are 20 questions to complete.
Take a part in the ongoing discussion
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4