Computer Applications
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
Java Arrays
28 Likes
Answer
0 to N-1
Reason — In Java, for an array having N elements, the subscripts start from 0 and go on till N - 1 (size - 1).
Answered By
17 Likes
Related Questions
Total size of array A having 25 elements of char type is …………… .
- 25 bytes
- 50 bytes
- 100 bytes
- None of these
Total size of array B[10][5] of int type is …………… .
- 50 bytes
- 15 bytes
- 100 bytes
- 200 bytes
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[ ];