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!

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

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.