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
Joshua Moore
8,013 PointsHow is this wrong? iOS, C arrays
Maybe I'm just too tired right now, but I don't see how this is wrong. Challenge asks the following: Declare 2 separate variables of type char named "alpha" and "bravo". Assign the letter 'a' to the variable "alpha" and the letter 'b' to "bravo".
My answer:
char alpha = a;
char bravo = b;
I tried it with quotes around the variable name and/or assignment.
6 Answers
maithreya reddy addula
3,761 Pointsok put "[ ]" after your variable name and put the letter in single quotes like this 'a';
Joshua Moore
8,013 PointsNVM, I got it
Nabin Bhattarai
1,385 PointsIt marks me wrong for the same question. Heres my code: char alpha[ ] = 'a'; char bravo[ ] = 'b';
Grant Johnson
272 Pointschar alpha ='a'; char bravo = 'b';
char variables require '' (int and float do not)
Grant Johnson
272 Pointssorry can't delete this
Grant Johnson
272 Pointssorry can't delete this