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

why wont my char instantiation work

char alpha = 'a';

3 Answers

Thiago Xavier
Thiago Xavier
9,529 Points

Daniel, maybe you are expecting to see your char printed on the screen, but I believe you didn't include a printf() statement in your code.

Kevin Fernandes
Kevin Fernandes
1,755 Points

That is the correct way to instantiate a char. Where is the problem occurring?

Andrew Ocejo
Andrew Ocejo
6,197 Points

Try

char alpha;
alpha = 'a';

Maybe the question was asking for a specific order? Declare variable then instantiate it?