MCQ Practice Single Best Answer Topic: ICSE Computer Application - Class X - 2025 SPECIMEN QUESTION PAPER

Q The size of '\n' is:

Question ID
#24253
Subchapter
ICSE Computer Application - Class X - 2025 SPECIMEN QUESTION PAPER
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A 2 bytes
  • B 4 bytes
  • C 8 bytes
  • D 16 bytes
Correct Answer: A

Explanation

Step 1: What is '\n' in Java?

  • '\n' is a character literal → newline character.

  • In Java, every character is stored in char type.


Step 2: Size of char in Java

  • Unlike C/C++, where char is 1 byte,

  • In Java, char is always 2 bytes (16 bits) because Java uses Unicode.


Step 3: Therefore

  • '\n' is simply a char, so its size = 2 bytes.


Answer: (a) 2 bytes

Share This Question

Share this MCQ with your friends or study group.