Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Objective-C Basics (Retired) Fundamentals of C Arrays

Jessica Jones
Jessica Jones
216 Points

arrays

Declare an array of type float named math_constants. The array should be big enough to hold 2 numbers. Bummer! Remember when declaring arrays, the size of the array is placed in box brackets: name_of_array[2]. PreviewRecheck work arrays.c

1 float number_of_math_contants[2];

3 Answers

Patrick Serrano
Patrick Serrano
13,834 Points

Remember that in C and Objective-C arrays are zero based.

Kevin Kenger
Kevin Kenger
32,834 Points

Hey Jessica,

The challenge is asking you to create an array called math_constants. It seems like you got everything right except the name of the array. It looks like you called it number_of_math_contants instead of math_constants.

here is what it should look like:

float math_constants[2];