‹ Back to the paper
Question 1(viii)
1 mark
Computer ScienceISC 2026 Computer Science Paper 1Assertion-reasonMethods
Study the Assertion and Reason and choose the correct option.
The return statement enables the exit of the program control from the current method.
Assertion: The return statement enables the exit of the program control from the current method.
Reason: If a method's return type is void, it can still contain return 0 statement to return nothing.
- (a)Both Assertion and Reason are true and Reason is the correct explanation for Assertion.
- (b)Both Assertion and Reason are true but Reason is not the correct explanation for Assertion.
- (c)Assertion is true and Reason is false.
- (d)Both Assertion and Reason are false.
Answer
Answer
Correct option: (c)
Answer: (c) Assertion is true and Reason is false.
The return statement terminates execution of the current method and returns control to the caller (Assertion is true). However, a method with return type void cannot return any value; 'return 0;' causes a compilation error (Reason is false).