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

Code Example 1

// Changing default values of enum constants
enum suit {
    club = 0,
    diamonds = 10,
    hearts = 20,
    spades = 3,
};

Code Example 2

#include <stdio.h> 
enum State {WORKING = 0, FAILED, FREEZED}; 
enum State currState = 2; 
  
enum State FindState() { 
    return currState; 
} 
  
int main() { 
   (FindState() == WORKING)? printf("WORKING"): printf("NOT WORKING"); 
   return 0; 
}

Learn ReactJs, React Native from akashmittal.com