CPP Break Statement MCQ
Cpp MCQ- Home
- Tutorials
- Cpp
- Break Statement
- Multiple Choice Question
(1) Which of the following has reciprocal functionality to break statement in loop?
A) non break
B) continue
C) begin
D) exit
Explanation
Continue keyword can be used as reciprocal functionality in iteration. It will continue loop rather than the unconditional termination
(2) In which of the following structure break can be used ?
A) Sequence
B) Selection
C) Iteration
D) All of these
Explanation
Break statement can be used in all control structures and anywhere in program.
(3) Which of the following is used to terminate iteration early?
A) end
B) stop
C) break
D) end iteration
Explanation
break keyword is used if we want to exit from the loop earlier to the condition.
(4) How many parameters does a break statement take as input ?
A) 1
B) 2
C) Multiple
D) None
Explanation
There is no parameter used after break statement. It is only followed by semicolon.
(5) In which of the following statements break statement is used?
A) Sequence
B) If
C) Function
D) Switch
Explanation
Break keyword is used inside body of switch statement. It can also be used in body of loop. When it is executed in body of loop then control move outside of the loop body.