Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Objects Encapsulation and Arrays Arrays

Calvin Secrest
Calvin Secrest
24,815 Points

The first index of an array is ________

I can't figure out the if int[] a; or a[0]; will be the first index of an array?

4 Answers

Pablo Rocha
Pablo Rocha
10,142 Points

a[0]; is the first index of array a.

int[] a; defines variable a as an array of integers.

Calvin Secrest
Calvin Secrest
24,815 Points

Thank you everyone for all your responses

K Cleveland
K Cleveland
21,839 Points

This question is asking you to think about how arrays are indexed. When you make an array, does the first index start at 0, 1, or some other number?

A[0] Index refers to the number inside the brackets ("0").

Hope that helps!

Calvin Secrest
Calvin Secrest
24,815 Points

Thanks for your reply, so is the first index of an array is int[] a; because when I key that code in the space but it was incorrect.