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

Help OBJECTIVE-C basics arrays challenge 4/4

Print the results. Your output should look like "letters a b".

char alpha = 'a'; char bravo = 'b'; char letters[2]; letters[0] = alpha, letters[1] = bravo; printf("letters a %c",bravo);

I did this exact code in a compiler and it came up perfect thought the treehouse says: Bummer! That was the correct string, but not the correct format.

thanks 2 anyone who replies!

3 Answers

You're nearly there, just a small error in the last line of your code. You need to print out the value of alpha rather than just 'a'.

char alpha = 'a'; 
char bravo = 'b'; 
char letters[2]; 
letters[0] = alpha, letters[1] = bravo; 
printf("letters %c %c", alpha, bravo);

THANK U SO MUCH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I noticed on this new Objective-C course and Code challenges on Arrays from Mr. Turner that “char” was not addressed in the video or how to use “char” correctly. I see that there are many ways to initialize/assign int, floats, and char’s but it never got addressed in this arrays section of learning. I wish this class on Objective-C they would talk about a subject in depth so we beginners would have a better idea so we can pass the code challenge really knowing the topic then struggling and looking for the answer because it was not taught in this video for a few days to find the answer. My main point is to learn the topic in depth and know it. I don’t mind if I have to watch the video many time until I get it, but when you don’t teach us, how am I supposed to know all this additional information for this is a beginners class. Please note that I have the upmost respect and praise for the Treehouse team. I just want to learn the most I can. Is the old Objective-C class available for download so beginners can learn more about Objective-C even though is old?

Thank you Treehouse.
Mark M.