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 trialsusie starkman
280 PointsCorrect 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
14,957 PointsChallenge 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]);
susie starkman
280 PointsThank 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
14,957 PointsInteresting - 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..:?
susie starkman
280 PointsIt 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.
susie starkman
280 PointsHere 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?
Thomas Nilsen
14,957 Pointsremove "return 0"