C examples for Data Type:enum
Defines an enumeration type plus two variables.
#include <stdio.h> int main(void) { enum Weekday {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday} today, tomorrow; printf("Weekday created\n"); printf("%d\n",today); printf("%d",tomorrow); return 0; /*from w ww .java 2 s .c o m*/ }