ICSE Class 10 Computer Applications
Question 19 of 30
Solved Sample Paper 2 — Question 19
Back to all questions 19
Question Question 1(xix)
Assertion (A) next() can read the input only till the space.
Reason (R) next() only gets to the line break.
- Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A).
- Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion (A).
- Assertion (A) is true and Reason (R) is false.
- Assertion (A) is false and Reason (R) is true.
Assertion (A) is true and Reason (R) is false.
Reason — Assertion (A) is true because the next() method reads input until it encounters a space character by default. Reason (R) is false because next() stops reading at the first whitespace character (which includes spaces, tabs, and line breaks), not just at line breaks.