मराठी

The index (subscript) of the last element of an array ar[ ] is ______. - Computer Applications

Advertisements
Advertisements

प्रश्न

The index (subscript) of the last element of an array ar[ ] is ______.

पर्याय

  • ar.length( )

  • ar[ ].length

  • ar.length()-1

  • ar.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
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×