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) Fundamentals of C Arrays

Correct code

Hello, I have tried numerous times to complete this code challenge. It is setting a simple char variable. I know what I have written is correct and have adjusted it in several attempts just to make sure. I keep getting a "Bummer!" message. I then cannot go on to the next code challenge until this registers as correct. It would be really helpful if after receiving an error message to see what the correct code should be. It's frustrating to be stuck at one challenge and not be able to move onto the others. PLease let me know how I can see the correct code because this has happened to me in prior challenges that are very basic and I know are correct. I just want to see where my code is wrong. please fix this.

5 Answers

Thomas Nilsen
Thomas Nilsen
14,957 Points

Challenge 1 - 4 answers:

char alpha = 'a';
char bravo = 'b';

char letters[2];
letters[0] = alpha;

letters[1] = bravo;

printf("letters %c %c", letters[0], letters[1]);

Thank you. This is the exact answer I had for challenge 1 and I still got the "bummer!" error message. I was then unable to continue onto the other 3 challenges. This also happened to be in the challenge for variables in the previous section. I knew the answer was simple and recreated it and still got a "Bummer!" message notifying me that floats are represented by %f. (which I did.) How does one find these answers to challenges incase this happens in the future and I just want to move onto the next challenges?

Thomas Nilsen
Thomas Nilsen
14,957 Points

Interesting - I just answered another post where a woman had the exact problem. Typed everything correctly, and still receives the error/bummer. What I don't understand through, is I ran though the challenges just now and didn't get any errors..:?

It just happened again in the 4th challenge. I have tripled check my typing and syntax with the correct answer and I still am getting an error message.

Here is exactly what I have for the 4 challenges: char alpha = 'a'; char bravo = 'b';

char letters[2]; letters[0]=alpha; letters[1]=bravo;

printf("letters %c %c", letters [0], letters [1]); return 0;

Can you tell me why I am still getting the error message?