C program to create enumerated data type for 12 months

				
					#include<stdio.h> 
#include<conio.h> 
void main()
{
Enum month(Jan, Feb, Mar, Apr, May, June, July, Aug,Sep, Oct, Nov, Dec) 
clrscr();
printf(“Jan=%d”, Jan);
printf(“Feb=%d”, Feb); 
printf(“June=%d”, June);
printf(“Nov=%d”, Nov);
printf(“Dec=%d”, Dec);
}
				
			
Output:

Jan =0 
Feb=1 
June=5
Nov=10
Dec=11

Leave a Reply