【发布时间】:2022-01-24 14:21:48
【问题描述】:
我想通过在开关的任何位置放置默认值来进行检查。它应该打印默认的 printf 语句,因为在开关中检查了默认大小写之后,没有匹配的大小写标签。但它显示了上述错误。
#include <stdio.h>
int main(void) {
// your code goes here
char ch='g';
switch(ch){
default: printf("Success!\n");
case 'v':
case 'h':
}
return 0;
}
【问题讨论】:
标签: switch-statement label clang syntax-error case