The correct syntax for using EXIT in a loop is ___________

The correct syntax for using EXIT in a loop is ___________
A. EXIT loop_label WHEN condition;
B. EXIT WHEN condition loop_label;
C. loop_label WHEN condition EXIT
D. EXIT WHEN loop_label condition
 
Answer: a
Explanation: EXIT is the keyword used for the execution of EXIT statement. This keyword is followed by the optional loop label which again is followed by keyword WHEN and the condition which should by true for ending the loop. If the loop label is absent, then the exit statement automatically applies tot the innermost enclosing loop.
 

Tìm kiếm

Back
Top