Home » C Programming » Structures, Unions, Enums

What will be the output of the program? #include int main() { enum days {MON=-1, TUE, WED=6, THU, FRI, SAT}; printf("%d, %d, %d, %d, %d, %d\n", ++MON, TUE, WED, THU, FRI, SAT); return 0; }

Correct Answer: Error

Explanation:

Because ++ or -- cannot be done on enum value.

← Previous Question Next Question→

More Questions from Structures, Unions, Enums

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion