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!
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

Jamil Jones
10,852 PointsStuck on this challenge for C Arrays
<html> <p>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".<p> <p>This is how I am doing it.<p>
<p> char alpha = a;</p><br> <p>char bravo = b;</p>
Here is the link for the code challenge
<p> Thanks for your help</p>
2 Answers

Ben Rubin
Courses Plus Student 14,658 PointsThe compiler is interpreting your code as a
and b
both being variables. To denote that something is a character, it needs to be surrounded by single quotes. For instance 'a'
is the character a.

Natacha S
11,561 Pointsyes ! basically it should look like this :
char alpha = 'a';
char bravo = 'b';

Chelcie Small
81 Pointsnothing better than a visual aid! Thanks Natacha!
Chelcie Small
81 PointsChelcie Small
81 Pointsthanks Ben! great explanation!