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

How 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

ok put "[ ]" after your variable name and put the letter in single quotes like this 'a';

NVM, I got it

It marks me wrong for the same question. Heres my code: char alpha[ ] = 'a'; char bravo[ ] = 'b';

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

char variables require '' (int and float do not)

sorry can't delete this

sorry can't delete this