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

Pointers and memory

Hi.

I have problem with the next exercise: Print the length of the array real_numbers using the sizeof() function. Your output should look like the following: Array real_numbers can store x items.

My code run fine when I compile the code with gcc. My code is:

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

but your system said me: Oops! It looks like Task 2 is no longer passing.

What's wrong? Can somebody help me? Thanks a lot.

3 Answers

Ramon Kleiss
Ramon Kleiss
977 Points

You have to add another printf for task 3. Not replace the printf from task 2. I found that out yesterday the hard way too.

Jesus Christ!! thanks a lot!!