Advertisements
Advertisements
प्रश्न
The index (subscript) of the last element of an array ar[ ] is ______.
विकल्प
ar.length( )ar[ ].lengthar.length()-1ar.length-1
MCQ
रिक्त स्थान भरें
Advertisements
उत्तर
The index (subscript) of the last element of an array ar[ ] is ar.length-1.
Explanation:
ar.length gives the last position, and -1 gives the actual index, as the index of the array starts from 0 to n-1.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2024-2025 (March) Official Board
