I am trying to find what will happen if I have 2 variables in enum and I assign it a value. I want a understanding on when i assign value to c_type which one gets used C1 or C2?
I have the following code:
typedef enum {
C1 = 0,
C2,
} c_type;
typedef struct A_a {
c_type store;
} A;
FuncABC(int val)
{
A a1;
a1.store = val; /here store has C1 and C2, which one gets used here?
}
Please, let me know. I know the above code works logically in C. But, want clarification on the assignment.