C Programming - Structures, Unions, Enums - Discussion

Discussion Forum : Structures, Unions, Enums - Yes / No Questions (Q.No. 6)
6.
Is there easy way to print enumeration values symbolically?
Yes
No
Answer: Option
Explanation:
You can write a function of your own to map an enumeration constant to a string.
Discussion:
4 comments Page 1 of 1.

Sunil pandey said:   1 decade ago
Well, No. You can write a little function (one per enumeration) to map an enumeration constant to a string, either by using a switch statement or by searching an array. (For debugging purposes, a good debugger should automatically print enumeration constants symbolically).

Mounica said:   8 years ago
Any example how to do it?

Rits said:   8 years ago
We can't it directly. Their is no inbuilt function for it.

Bhargavi said:   8 years ago
Please, anyone explain in detail.

Post your comments here:

Your comments will be displayed after verification.