Control flow statement 3
Quiz-summary
0 of 10 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Information
Control Flow Statements:
Questions related to
* if condition
* switch statement
* for loop
* while loop
* do while loop
* break
* continue
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 10 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Average score |
|
Your score |
|
Categories
- Not categorized 0%
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- Answered
- Review
-
Question 1 of 10
1. Question
1 pointsWhich keyword can be used for coming out of recursion?
Correct
Incorrect
-
Question 2 of 10
2. Question
1 pointsWhat is the output of this C code?
#include <stdio.h>
int main()
{
int a = 0, i = 0, b;
for (i = 0;i < 5; i++)
{
a++;
continue;
}
printf(“%d”,a);return 0;
}Correct
Incorrect
-
Question 3 of 10
3. Question
1 pointsWhat is the output of this C code?
#include <stdio.h>
int main()
{
int a = 0, i = 0, b;
for (i = 0;i < 5; i++)
{
a++;
if (i == 3)
break;
}
printf(“%d”,a);
return 0;
}Correct
Incorrect
-
Question 4 of 10
4. Question
1 pointsThe keyword ‘break’ cannot be simply used within:
Correct
Incorrect
-
Question 5 of 10
5. Question
1 pointsWhich keyword is used to come out of a loop only for that iteration?
Correct
Incorrect
-
Question 6 of 10
6. Question
1 pointsWhat is the output of this C code?
#include <stdio.h>
int main()
{
int i = 0, j = 0;
for (i = 0;i < 5; i++)
{
for (j = 0;j < 4; j++)
{
if (i > 1)
break;
}
printf(“Hi \n”);
}
return 0;
}Correct
Incorrect
-
Question 7 of 10
7. Question
1 pointsWhat is the output of this C code?
#include <stdio.h>
int main()
{
int i = 0;
int j = 0;
for (i = 0;i < 5; i++)
{
for (j = 0;j < 4; j++)
{
if (i > 1)
continue;
printf(“Hi \n”);
}
}
return 0;
}Correct
Incorrect
-
Question 8 of 10
8. Question
1 pointsWhat is the output of this C code?
#include <stdio.h>
int main()
{
int i = 0;
for (i = 0;i < 5; i++)
if (i < 4)
{
printf(“Hello”);
break;
}
return 0;
}Correct
Incorrect
-
Question 9 of 10
9. Question
1 pointsWhat is the output of this C code?
#include <stdio.h>
int main()
{
int i = 0;
if (i == 0)
{
printf(“Hello”);
continue;
}
return 0;
}Correct
Incorrect
-
Question 10 of 10
10. Question
1 pointsWhat is the output of this C code?
#include <stdio.h>
int main()
{
int i = 0;
if (i == 0)
{
printf(“Hello”);
break;
}
return 0;
}Correct
Incorrect