Here is an example that indicates how union members are accessed.
The output also indicates that the union members share the same storage!
The value of u.x uses the same bits as u.y, but interprets them as an int instead of a float.
typedef union { int x; float y; } number; number u; u.y = 10.0; printf("u.x = %d, u.y = %f\n", u.x, u.y); Output: u.x = 1092616192, u.y = 10.000000