Why enum can not be used directly with printf function?
Answers were Sorted based on User's Feedback
Answer / rashmi p
enum is not an basic data type like int,float and all it is
a user defined data type, and printf function works only
with basic data type, we 've overload printf function to
make it work for user defined data types :)
Is This Answer Correct ? | 21 Yes | 2 No |
Answer / sudip
main()
{
enum color{
red,black,green,yellow,blue,pink,white
};
printf("%d",green);
printf("%d",yellow);
}
this gives me output.... 23
we can use it....?/ Correct me if I am wrong...
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / srinivas
it is DAta type name like int so it can not be in printf
Is This Answer Correct ? | 5 Yes | 3 No |
Explain data structure
What is complete binary tree in data structure?
Why do we need searching algorithms?
What is data type and its types?
What is dynamic array in excel?
There are 2 int type array data type. One is containing 50 elements, and another one is containing 30 elements. Can we assign the array of 50 elements to an array of 30 elements?
Suppose in an integer array, there is 1 to 100 number, out of one is duplicate, how to find?
What is the Difference between treemap and hashmap?
write a program to accept name & sort them?
How do you sort an array by value?
What is the difference between set and unordered_set?
What is data structure definition?