The provided code snippet contains a switch statement with a syntax error.
The printf("hello"); line is outside the switch block, and it will cause a
compilation error.
int a = 2;
switch (a) {
printf("hello");//remember ouside of case se cannot add any print statements code crashes
case a:
//some stmts
break;
case b:
//some stmts
break;
default:
break;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: