有人可以解释为什么即使用户键入“古典”或“爵士”,前面的代码块总是导致“抱歉,这不是选择之一”?
#include <stdio.h>
int main()
{
char c[20];
printf("Hey! I hear you like music! What type do you like? (Classical/Jazz/Rock) ");
gets(c);
if(c == "Classical" || c == "classical")
printf("Classical music is great.");
else if(c == "Jazz" || c == "jazz")
printf("Jazz is awesome!");
else
printf("Sorry, that's not one of the choices.");
getchar();
return 0;
}