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

General Discussion

Objective C else if and switch error

getting ")" expected on all printf lines yet they look the same as the instructor has done

Can you post your code?

2 Answers

include <stdio.h>

int main() { char a = 'a'; char b = 'b'; char g = 'g';

char letter = 'z';

switch (letter){
    case 'a':
        printf("letter %c is %c\n", letter a);
        break;

    case 'b':
        printf("letter %c is %c\n", letter b);
        break;

    case 'g':
        printf("letter %c is %c\n", letter g);
        break;
    default:
        printf("letter is not found\n" letter);
        break;
}

return 0;

}

.

It looks like you're missing commas between your arguments to printf.

thank you, don't know how I missed it on the video.