MCQ Practice Single Best Answer Topic: ICSE Computer Application - Class X - 2025 PYQ

Q System.out.println('Z'+32); will display:

Question ID
#24150
Subchapter
ICSE Computer Application - Class X - 2025 PYQ
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A z
  • B Z
  • C 122
  • D 154
Correct Answer: D

Explanation

The correct answer is:

(d) 154

Explanation:

In the expression:


System.out.println('Z' + 32);

  1. The character 'Z' has an ASCII value of 90.

  2. The integer 32 is added to it:
    90 + 32 = 122.

  3. Since both 'Z' (char) and 32 (int) are involved in an arithmetic operation, 'Z' is promoted to an integer before addition.

  4. The result is 122, which is the ASCII value of 'z', but since no type casting is done, it prints the integer 122 instead of the character 'z'.

So, the correct answer should be (c) 122, not (d) 154. Please verify your answer choices.

Share This Question

Share this MCQ with your friends or study group.