Computer Applications
How many bytes are occupied by the below two-dimensional array?
| 156 | 20 | 154 | 20 |
| 130 | 20 | 130 | 20 |
| 162 | 17.67 | 161 | 20 |
| 158 | 17.5 | 154 | 20 |
- 96 bytes
- 128 bytes
- 12 bytes
- 24 bytes
Java Arrays
1 Like
Answer
128 bytes
Reason — The given table represents a 4×4 two-dimensional array (4 rows and 4 columns), which means there are 16 elements in total. The values include both integers and decimal numbers, indicating that the array is of double data type (which can store both whole numbers and decimal numbers).
In Java, a double occupies 8 bytes.
So, total bytes = 16 elements × 8 bytes = 128 bytes.
Answered By
3 Likes
Related Questions
Name the feature of Java depicted in the below picture.

- Encapsulation
- Inheritance
- Polymorphism
- Data abstraction
Name the data types in order from top, given in the above picture.

- int, char, double, String
- String, int, char, double
- char, double, int, String
- int, double, char, String
A girl wanted to calculate the sum of two numbers stored as a and b multiplied by 7. Select the appropriate Java expression.
- a + b*7
- 7*a + b
- (a + b)*7
- a + 7*b
The sum of
a[1]anda[3]in the arrayint a[] = {20, 40, 60, 80, 100}is:- 80
- 100
- 120
- 60