QUESTION IMAGE
Question
which statement about the following arrays is correct? vowels5 = \a\, \e\, \i\, \o\, \u\ someconsonants10 = \b\, \c\, \d\, \f\, \g\, \h\, \j\, \k\, \l\, \m\ a. for someconsonants, the highest subscript is 10 and the lowest is 1. b. for vowels, the highest subscript is 5 and the lowest is 0. c. for someconsonants, the highest subscript is 9 and the lowest is 0. d. for vowels, the highest subscript is 4 and the lowest is 1.
In most programming languages, array indexing starts at 0. For an array of size n, the valid indices range from 0 to n - 1. The vowels array has a size of 5, so its indices range from 0 to 4. The someConsonants array has a size of 10, so its indices range from 0 to 9.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
C. For someConsonants, the highest subscript is 9 and the lowest is 0.