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

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