What will be the output of the following C code?
#include
enum sanfoundry
{
a,b,c=5
};
int main()
{
enum sanfoundry s;
b=10;
printf("%d",b);
}
Answer: A
The above code results in an error. This is because it is not possible to change the values of enum constants. In the code shown above, the statement: b=10; causes the error.