250+ TOP MCQs on Break and Continue and Answers

C Objective Questions on “Break and Continue statements”. One shall practice these Objective Questions to improve their C programming skills needed for various interviews (campus interviews, walkin interviews, company interviews), placements, entrance exams and other competitive exams. These questions can be attempted by anyone focusing on learning C Programming language. They can be a beginner, fresher, engineering graduate or an experienced IT professional. Our C Objective Questions come with detailed explanation of the answers which helps in better understanding of C concepts.

Here is a listing of C Objective Questions on “Break and Continue statements” along with answers, explanations and/or solutions:

1. Which keyword can be used for coming out of recursion?
a) break
b) return
c) exit
d) both break and return
Answer: b
Clarification: None.

2. What will be the output of the following C code?

  1.     #include 
  2.     int main()
  3.     {
  4.         int a = 0, i = 0, b;
  5.         for (i = 0;i < 5; i++)
  6.         {
  7.             a++;
  8.             continue;
  9.         }
  10.     }

a) 2
b) 3
c) 4
d) 5
Answer: d
Clarification: None.

3. What will be the output of the following C code?

  1.     #include 
  2.     int main()
  3.     {
  4.         int a = 0, i = 0, b;
  5.         for (i = 0;i < 5; i++)
  6.         {
  7.             a++;
  8.             if (i == 3)
  9.                 break;
  10.         }
  11.     }

a) 1
b) 2
c) 3
d) 4
Answer: d
Clarification: None.

4. The keyword ‘break’ cannot be simply used within _________
a) do-while
b) if-else
c) for
d) while
Answer: b
Clarification: None.

5. Which keyword is used to come out of a loop only for that iteration?
a) break
b) continue
c) return
d) none of the mentioned
Answer: b
Clarification: None.

6. What will be the output of the following C code?

  1.     #include 
  2.     void main()
  3.     {
  4.         int i = 0, j = 0;
  5.         for (i = 0;i < 5; i++)
  6.         {
  7.             for (j = 0;j < 4; j++)
  8.             {
  9.                 if (i > 1)
  10.                     break;
  11.             }
  12.             printf("Hi n");
  13.         }
  14.     }

a) Hi is printed 5 times
b) Hi is printed 9 times
c) Hi is printed 7 times
d) Hi is printed 4 times
Answer: a
Clarification: None.

7. What will be the output of the following C code?

  1.     #include 
  2.     void main()
  3.     {
  4.         int i = 0;
  5.         int j = 0;
  6.         for (i = 0;i < 5; i++)
  7.         {
  8.             for (j = 0;j < 4; j++)
  9.             {
  10.                 if (i > 1)
  11.                     continue;
  12.                     printf("Hi n");
  13.             }
  14.         }
  15.     }

a) Hi is printed 9 times
b) Hi is printed 8 times
c) Hi is printed 7 times
d) Hi is printed 6 times
Answer: b
Clarification: None.

8. What will be the output of the following C code?

  1.     #include 
  2.     void main()
  3.     {
  4.         int i = 0;
  5.         for (i = 0;i < 5; i++)
  6.             if (i < 4)
  7.             {
  8.                 printf("Hello");
  9.                 break;
  10.             }
  11.     }

a) Hello is printed 5 times
b) Hello is printed 4 times
c) Hello
d) Hello is printed 3 times
Answer: c
Clarification: None.

Leave a Reply

Your email address will not be published. Required fields are marked *