i want to get the print of enumuration constants that has been defined in current enumeration in C language.how?
The short answer is "you can't", not in standard C. Given Code: enum colours { red, green, blue }; there is no quick and easy way of getting the system to print say "red". One way is to define a lookup table, such as Code: struct { enum colours; char *word; } table[] = { { red, "red" }, { green, "green" }, { blue, "blue" } };