Computer Applications
Total size of array B[10][5] of int type is …………… .
- 50 bytes
- 15 bytes
- 100 bytes
- 200 bytes
Java Arrays
6 Likes
Answer
200 bytes
Reason — The size of int data type is 4 bytes. Since B is an array of int type, the size of each element of the array will be 4 bytes. The array has 10 rows and 5 columns, thus total number of elements will be 10 X 5 = 50. The size of 50 elements will be 50 X 4 = 200 bytes.
Answered By
5 Likes
Related Questions
In Java, for an array having N elements, legal subscripts are :
- 0 to N
- 0 to N-1
- 1 to N
- 1 to N - 1
Total size of array A having 25 elements of char type is …………… .
- 25 bytes
- 50 bytes
- 100 bytes
- None of these
Total number of elements in array C[5][3][2] are …………… .
- 10
- 20
- 30
- 50
Which of the following statements are valid array declaration ?
- int number( );
- float average[ ];
- double[ ] marks;
- counter int[ ];