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

iOS Objective-C Basics (Retired) Pointers and Memory Array Size and Length

Array Length Quiz help

Im a little confused here. Either I'm missing the Objective-C part in the Video or they just aren't there. Like in the previous video %s wasn't even explained? Anyways, here is what I have so far:

float real_numbers[5] = {1.1, 2.2, 3.3, 4.4, 5.5}; printf("Array real_numbers is %ld bytes\n", sizeof(real_numbers)); printf("real_numbers can store %ld items.\n", sizeof(real_numbers)/sizeof(float));

3 Answers

Hi Jeffrey,

Your output for the last one doesn't match the format of what the challenge requested.

Output should be "Array real_numbers can store x items." You're missing "Array " at the beginning.

Also, this is fine for task 1: float real_numbers[5];

You don't have to initialize the array with values. You simple need to declare space for 5 floats.

Over thinking and missing details! Thanks for answering that despite the obvious!

Respectfully,

Jeff

Over thinking and missing details! Thanks for answering that despite the obvious!

Respectfully,

Jeff