हिंदी

Assertion (A): In switch case break statement avoids fall through. Reason (R): break statement helps to execute only one case at a time. - Computer Applications

Advertisements
Advertisements

प्रश्न

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.

MCQ
अभिकथन और तर्क
Advertisements

उत्तर

Both (A) and (R) are true and (R) is a correct explanation of (A).

Explanation:

The break statement causes the control to exit the switch–case block, preventing fall-through and ensuring that only the matching case or cases are executed.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2024-2025 (March) Official Board
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×