Computer Applications
The number of bytes occupied by a character array of four rows and three columns are:
- 12
- 24
- 96
- 48
Values & Data Types Java
ICSE 2024
2 Likes
Answer
24
Reason — In Java, a character (char
) takes 2 bytes because Java uses Unicode encoding.
Given:
Character Array: 4 rows and 3 columns
Total Elements = 4 × 3 = 12 characters
Memory Calculation:
Each character = 2 bytes
Total Memory = 12 × 2 = 24 bytes
Answered By
1 Like
Related Questions
What is the method to check whether a character is a letter or digit?
- isDigit(char)
- isLetterOrDigit()
- isLetterOrDigit(char)
- isLETTERorDIGIT(char)
The extension of a Java source code file is:
- exe
- obj
- jvm
- java
Which of the following data type cannot be used with switch case construct?
- int
- char
- String
- double
Which of the following are entry controlled loops?
(a) for
(b) while
(c) do..while
(d) switch
- only a
- a and b
- a and c
- c and d