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

Can someone help show me where i went wrong? 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".

char alpha[1]; alpha[0] = a; char bravo[1]; bravo[0] = b;

2 Answers

Holger Liesegang
Holger Liesegang
50,595 Points

Hi Chaucer,

first you might want to use 'a' and 'b' with single quotations around them for the assignment because a and b would be interpreted as variables and second you don't need the square brackets behind alpha and bravo as the question states that you need a variable of type char and not an array.

And of course welcome to Treehouse, Chaucer Blake !

Kind Regards Holger

Hey Holger,

I can't thank you enough for that! I'm starting to feel the sense of community here at Treehouse because of you. Awesome advice.

Best Chaucer