English

How many bytes a char data type occupies in the memory? - Computer Applications

Advertisements
Advertisements

Question

How many bytes a char data type occupies in the memory? 

Options

  • 2

  • 8

  • 4

  • 16

MCQ

Solution

2

Explanation:

In Java, the char data type takes up two bytes (16 bits) in memory. Java's char encoding is UTF-16, allowing it to represent Unicode characters. 

shaalaa.com
  Is there an error in this question or solution?
Chapter 1.03: Values and Data Types - EXERCISES [Page 32]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 1.03 Values and Data Types
EXERCISES | Q I. 1. | Page 32
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×
Our website is made possible by ad-free subscriptions or displaying online advertisements to our visitors.
If you don't like ads you can support us by buying an ad-free subscription or please consider supporting us by disabling your ad blocker. Thank you.