Example code I wrote in Lion Programming Course
[code language=”c”]
#include <stdio.h>
int main () {
char a;
scanf("%s", &a);
a == ‘a’ || a == ‘e’ || a == ‘i’ || a == ‘o’ || a == ‘u’ ? printf("Vowel\n") : printf("Consanant\n") ;
}
[/code]
I first coded a == “x”, but compiler would warn me that I compared int with pointer, since double quote would represent string here, not character. I then changed it to single quote and problem solved.