MCQ
Q.
What will be output of the following c code?
#include
const enum Alpha
{
X,
Y=5,
Z
}p=10;
int main()
{
enum Alpha a,b;
a= X;
b= Z;
printf("%d",a+b-p);
return 0;
}
Correct Answer: A
Default value X is zero and
Z = Y + 1 = 5 + 1 = 6
So, a + b