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

Rahul Chidanand
Rahul Chidanand
Courses Plus Student 3,564 Points

Hello I ran the following code. The output seems to be the same as expected but it says the program does not pass.

The output is what is expected but still does not pass

float real_numbers[5];
printf("Array real_numbers can store %ld items.",sizeof(real_numbers)/sizeof(float));

2 Answers

William Li
William Li
Courses Plus Student 26,868 Points

Are you sure? The code looks fine to me. This code will definitely get you pass part 3 of the challenge. However, the code from part 2 of the challenge seem missing here, did you delete it? Please don't do that, because even though you passed part 2 and now at part 3, when you submit code, the grader always test each part of your codes, if you make change that break the previous parts of challenge, you need to go back and fix it before proceeding.