I wanted to check by placing default anywhere in the switch. It should print the default printf statement as no case label is matching & after that default case is checked in the switch. But it's showing the above error.
#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;
}
Try putting break; after the case statements.