Assertion (A) : The break; statement is used to exit from if statement.
Reason (R) : In while (1) loop break; statement is put at the end of a loop.
UGC NET - 2012,
Answer: C
The key treats the assertion as true and the reason as false. The break statement is used to leave a loop or a switch, and it is commonly placed under an if statement so that the loop is left when the condition holds, which is the sense of exiting from an if statement in the key. The reason says that in a while(1) loop the break statement is put at the end of the loop, which is false, because it is put inside a condition anywhere in the loop body, otherwise the loop would end after the first pass with no test. The answer is that (A) is true and (R) is false.
Please log in or register to report this question.