Check out example codes for "a enum data type in c". It will help you in understanding the concepts better.

Code Example 1

// example program to demonstrate working 
// of enum in C 
#include<stdio.h> 
  
enum year{Jan, Feb, Mar, Apr, May, Jun, Jul,  
          Aug, Sep, Oct, Nov, Dec}; 
  
int main() 
{ 
   int i; 
   for (i=Jan; i<=Dec; i++)       
      printf("%d ", i); 
        
   return 0; 
} 


// OUTPUT
0 1 2 3 4 5 6 7 8 9 10 11

Code Example 2

// An example program to demonstrate working 
// of enum in C 
#include<stdio.h> 
  
enum week{Mon, Tue, Wed, Thur, Fri, Sat, Sun}; 
  
int main() 
{ 
    enum week day; 
    day = Wed; 
    printf("%d",day); 
    return 0; 
}  
// OUTPUT
2

Learn ReactJs, React Native from akashmittal.com