M Man Ly New member Sep 21, 2021 #1 What will be the output of the following C code? Code: #include<stdio.h> enum 123hoidap { a,b,c=5 }; int main() { enum 123hoidap s; b=10; printf("%d",b); } A. Error B. 10 C. 1 D. 4
What will be the output of the following C code? Code: #include<stdio.h> enum 123hoidap { a,b,c=5 }; int main() { enum 123hoidap s; b=10; printf("%d",b); } A. Error B. 10 C. 1 D. 4
P Phạm Khánh Đoan New member Sep 21, 2021 #2 Answer: a Explanation: 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. Upvote 0 Downvote
Answer: a Explanation: 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.