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

Darwin Nunez
PLUS
Darwin Nunez
Courses Plus Student 933 Points

size variable

I dont get this

Darwin Nunez 426 less than a minute ago

I am in the second part for what i understand is this. It ask that I use the print function to get the size of the variable real_numbers in bytes. this is what I got

. printf("real_numbers %ld bytes", sizeof(real_numbers));

Hi Darwin,

Which part are you on and what do you have so far for code?

3 Answers

Darwin Nunez
PLUS
Darwin Nunez
Courses Plus Student 933 Points

I am in the second part for what i understand is this. It ask that I use the print function to get the size of the variable real_numbers in bytes. this is what I got. printf("real_numbers %ld bytes", sizeof(real_numbers));

Your only problem is that you're not matching the exact output the challenge wants.

Adjust your output string to match "Array real_numbers is x bytes."

Your current output string is "real_numbers x bytes"

I think the period at the end is optional.

Darwin Nunez
PLUS
Darwin Nunez
Courses Plus Student 933 Points

I also have written it like this Printf("Array real_numbers %ld bytes", size of (real_numbers)); And it's wrong too

You want to use a lowercase 'p' in printf like you have originally.

You're missing the word "is" from the output string. Should be `"Array real_numbers is %ld bytes."

Also, there should not be a space in size of. It's sizeof