Element doubleArray[7] is which element of the array?

the sixth
the seventh
the eighth
impossible to tell

The correct answer is D. impossible to tell.

The element doubleArray[7] is the seventh element of the array if the array is indexed from 0. However, if the array is indexed from 1, then the element doubleArray[7] is the eighth element of the array. Therefore, it is impossible to tell which element of the array doubleArray[7] is without knowing how the array is indexed.

Exit mobile version