Please find the sample code below
typedef enum { ID_001 = 1, ID_002 = 2, ID_003 = 3, }ENM_t; #define ERR(en) {printf("ID = %d\\n", en);} int