I know lot of questions stackoverflow on this topic one but I did't find answer to this one.
struct message
{
int myint;
};
int main(void)
{
switch(1)
{
case 0:
break;
case 1:
int i; // this is fine, but int i = 10; is compile error
break;
default:
break;
}
return 0;
}
Logically speaking why is defining variable and initializing it with some value is different than just defining variable for 'case labels'?