हिंदी

A single dimensional array has 50 elements; which of the following is the correct statement to initialize the last element to 100? - Computer Applications

Advertisements
Advertisements

प्रश्न

A single dimensional array has 50 elements; which of the following is the correct statement to initialize the last element to 100?

विकल्प

  • x[51]=100

  • x[48]=100

  • x[49]100

  • x[50]=100

MCQ

उत्तर

x[49]100

Explanation:

  • In a single-dimensional array with 50 elements, the indices range from 0 to 49.
  • Therefore, the last element of the array is at index 49, and x[49]100 Correctly initializes this last element to 100.
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2024-2025 (April) Specimen Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×