C examples for Data Type:enum
Declare a variable of type Weekday and initialize it.
#include <stdio.h> int main(void) { enum Weekday {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday}; //from w w w . jav a 2s .c o m enum Weekday today = Wednesday; printf("Weekday created\n"); printf("%d\n",today); return 0; }