C examples for Data Type:enum
Initialize the variable for an enumeration type
#include <stdio.h> int main(void) { enum Weekday {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday} today = Monday, tomorrow = Tuesday; printf("Weekday created\n"); printf("%d\n",today); printf("%d",tomorrow); return 0; // ww w . ja v a 2s.c o m }