C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

Write a C program to create enumerated data type for 12 months. Display their values in integer constants ?

0 votes
302 views
asked by smith Geek (15,340 points)

1 Answer

0 votes

 

#include<stdio.h>

#include<conio.h>

void main()

{

Enum month{Jan, Feb, mar, Apr, May, June, July, Aug, Sep, Oct, Nov, Dec}

clrscr();

printf(“\n Jan=%d”, Jan);

printf(“\n Feb=%d”, Feb);

printf(“\n June=%d”, June);

printf(“\n Dec=%d”, Dec);

getch();

}

Output:

Jan=0

Feb=1

June=5

Dec=11 

answered by rajesh Guru (39,140 points)

Related questions

...