Which statement exits a loop immediately?
-
A
continue
-
B
break
Correct answer
-
C
pass
-
D
return
10 views
Explanation
break exits the loop immediately. continue skips the rest of the current iteration and moves to the next.
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ