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

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

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

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

Thank you everyone for all your responses

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!

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.