Computer Applications
Assertion (A): In switch case, break statement avoids fall through.
Reason (R): break statement helps to execute only one case at a time.
- Both (A) and (R) are true and (R) is a correct explanation of (A).
- Both (A) and (R) are true and (R) is not a correct explanation of (A).
- (A) is true and (R) is false.
- (A) is false and (R) is true.
Answer
Both (A) and (R) are true and (R) is a correct explanation of (A).
Reason — In a switch case, the break statement stops the program from executing the next cases after a match is found. Without the break, the program would continue to run all the cases below the matched one (called fall through). Therefore, the break statement helps to execute only one case at a time.
Related Questions
Which of the following is true for the given object creation statement?
Game cricket = new Game();- Game is an object of cricket class
- New keyword creates object Game
- Game is a class and cricket is an object
- Game and cricket are objects
Post Office is an example for …………… access specifier.
- public
- local
- protected
- private
A physical education teacher asks the students to do the side stretch as shown below, 10 times. Which programming construct the teacher uses?

- if
- switch
- for
- if else if
The index(subscript) of the last element of an array ar[] is:
- ar.length()
- ar[].length
- ar.length() – 1
- ar.length – 1