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 trialAtal Wassimi
48 Pointshow is my array wrong?
I seem to not get the test questions right? [ char alpha[] = {a}; ]
2 Answers
Stone Preston
42,016 Pointsyou are not asked to make a char array named alpha, you are asked just for a char variable named alpha.Here is a hint: to create a char variable:
char someCharVariable = 'z';
RASHU BHATNAGAR
Courses Plus Student 2,669 Pointswhen we apply the box brackets to a variable, then we mean to define an array, where as when defining a simple variable no box brackets[ ] are required. All character values are enclosed with in a pair of single quotes ' '
char alpha='a';
I hope you get it now....