True or false array questions

I just want to make sure I didn't confuse the zero based stuff between index and elements. Are my answers correct here? Or am I mixing when it is zero based and when it's not?

3. The statement int list[25]; declares list to be an array of 26 components, since the array index starts at 0.

This is false because the array will have 25 components. This doesn’t have anything to do with starting at 0.

4. Given the declaration int list[20]; the statement list[12] = list[5] + list[7]; updates the content of the twelfth component of the array list.

This if false because it will update the thirteenth component of the array list because the index is zero based.
Both of your answers are correct.
Topic archived. No new replies allowed.