<分区>
Possible Duplicate:
Default case in a switch condition
我可以编译这段代码而不会遇到任何错误。我觉得应该是switch语句中的assadfsd
出错了。
为什么编译不会失败?
#include <stdio.h>
int main(void)
{
int choice =0;
scanf("%d",&choice);
switch(choice)
{
case 1 :
printf("Case 1\n");
break;
assadfsd :
printf("Error\n");
}
return 0;
}