a enum data type in c

Solutions on MaxInterview for a enum data type in c by the best coders in the world

showing results for - "a enum data type in c"
Louis
06 Oct 2016
1// An example program to demonstrate working 
2// of enum in C 
3#include<stdio.h> 
4  
5enum week{Mon, Tue, Wed, Thur, Fri, Sat, Sun}; 
6  
7int main() 
8{ 
9    enum week day; 
10    day = Wed; 
11    printf("%d",day); 
12    return 0; 
13}  
14// OUTPUT
152