1// example program to demonstrate working
2// of enum in C
3#include<stdio.h>
4
5enum year{Jan, Feb, Mar, Apr, May, Jun, Jul,
6 Aug, Sep, Oct, Nov, Dec};
7
8int main()
9{
10 int i;
11 for (i=Jan; i<=Dec; i++)
12 printf("%d ", i);
13
14 return 0;
15}
16
17
18// OUTPUT
190 1 2 3 4 5 6 7 8 9 10 11