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
Aurelian Spodarec
7,369 PointsSome arrays not working
I have problem and not sure whats wrong with it , i think i tried w=everything and nothing works.
sing 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. Bummer! Make sure you are calling printf and passing a string (not an NSString) and "real_numbers" as the parameters. The correct format option is '%ld'. Preview Recheck work array_length.mm
float real_numbers[] = {1.1, 2.2, 3.3, 4.4, 5.5};
printf("float array size is %ld bytes", sizeof(real_numbers));
return 0;
1 Answer
Christopher Bijalba
12,446 PointsYour problem is that you're not typing in exactly what they're expecting to see in your printf.
Change
printf("float array size is %ld bytes", sizeof(real_numbers));
to
printf("Array real_numbers is %ld bytes.", sizeof(real_numbers));
Aurelian Spodarec
7,369 PointsAurelian Spodarec
7,369 Pointsah well xd I managed to finish it late night xd but thank you , now I will remember to type what they said