Computer Applications
The number of bytes occupied by a character array of 10 elements.
- 20 bytes
- 60 bytes
- 40 bytes
- 120 bytes
Java Arrays
ICSE Sp 2024
54 Likes
Answer
20 bytes
Reason — A char data type occupies '2' bytes in the memory. Thus, 10 char type elements occupy (10 x 2) = 20 bytes in memory.
Answered By
28 Likes
Related Questions
Ternary operator is a:
- logical operator
- arithmetic operator
- relational operator
- conditional operator
When primitive data type is converted to a corresponding object of its class, it is called:
- Boxing
- Unboxing
- explicit type conversion
- implicit type conversion
The method of Scanner class used to accept a double value is:
- nextInt()
- nextDouble()
- next()
- nextInteger()
Among the following which is a keyword:
- every
- all
- case
- each