Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Why enum can not be used directly with printf function?

Answers were Sorted based on User's Feedback



Why enum can not be used directly with printf function?..

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

Why enum can not be used directly with printf function?..

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

Why enum can not be used directly with printf function?..

Answer / srinivas

it is DAta type name like int so it can not be in printf

Is This Answer Correct ?    5 Yes 3 No

Post New Answer

More Data Structures Interview Questions

What is queue in data structure?

0 Answers  


How do you declare An array of three pointers to chars

0 Answers  


What are linked lists most commonly used for?

0 Answers  


Is bubble sort faster than selection sort?

0 Answers  


Run time memory allocation is known as in data structure?

0 Answers  


What is dynamic array how it is created?

0 Answers  


How would you swap the Kth node from beginning with Kth node from end in a Linked List.

0 Answers   DELL,


Explain what are the notations used in evaluation of arithmetic expressions using prefix and postfix forms?

0 Answers  


What do you mean by secondary clustering?

0 Answers  


For searches. Which one is most preferred: array list or linked list?

0 Answers  


What is data and data types?

0 Answers  


What are different dynamic memory allocation technique in c.

0 Answers  


Categories