1(x)
Java statement to access the 5th element of an array is:
- (a)X
- (b)X
- (c)X
- (d)X[0]
Show SolutionHide Solution↓
X[4]
Reason — Array indexes start from 0. So, X[4] refers to the 5th element of the array.
ICSE Class 10 Computer Applications PYQ · 2024 Specimen · Section A
Java statement to access the 5th element of an array is:
X[4]
Reason — Array indexes start from 0. So, X[4] refers to the 5th element of the array.