Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

which statement about the following arrays is correct? vowels5 = \a\, \…

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.

Explanation:

Brief Explanations

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.

Answer:

C. For someConsonants, the highest subscript is 9 and the lowest is 0.