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) Pointers and Memory Array Size and Length

i am not clear what the last question is asked. and i am not able to clear the challenge because of that. please reply

please help me with last question as i am not able to understand the question nicely.

1 Answer

Hi Karan,

The 3rd task wants you to print the length or number of items that the array can store. In task 1 you were asked to create an array with enough room for 5 floats. So we already know that the answer should be 5 but it wants us to calculate that number using sizeof().

From task 2 you know to get the total size of the array with sizeof(real_numbers)

If you divide that by the size of a float, sizeof(float), that should give you the length of the array.