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 |
What is queue in data structure?
How do you declare An array of three pointers to chars
What are linked lists most commonly used for?
Is bubble sort faster than selection sort?
Run time memory allocation is known as in data structure?
What is dynamic array how it is created?
How would you swap the Kth node from beginning with Kth node from end in a Linked List.
Explain what are the notations used in evaluation of arithmetic expressions using prefix and postfix forms?
What do you mean by secondary clustering?
For searches. Which one is most preferred: array list or linked list?
What is data and data types?
What are different dynamic memory allocation technique in c.