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

Derek Southworth
Derek Southworth
679 Points

Pointers and memory...Using the printf function print the size in bytes of the variable real_numbers...

Can not figure this out.

Question: "Using the printf function print the size in bytes of the variable real_numbers. Your output should look like the following: Array real_numbers is x bytes."

Line 1 is correct, line 2 is not. Answer I have: float real_numbers[] = {1, 2, 3, 4, 5 }; printf("real numbers %ld bytes\n", sizeof(real_numbers));

1 Answer

Hi Derek,

Your only issue is that you're not matching the exact output that it wants.

Output the challenge wants: "Array real_numbers is x bytes."

Your output: "real numbers x bytes\n"