Hello,
#include <stdio.h>
int main(void)
{
const int j = 2;
int i;
switch (i) {
case 1:break;
case j:break;
default:break;
}
return 0;
}
i tried executing the above code, and i got the following error:
error: case label does not reduce to an integer constant
Well, since i have declared j as const , should it not take it as a constant?
Can anyone please explain?
Thanks.