1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #include <stdio.h> union example { int i; char c; }; int main(void) { union example data; data.c = 'A'; printf("data.c:%c data.i:%i\n", data.c, data.i); data.i = 10000; printf("data.c:%c data.i:%i\n", data.c, data.i); } | cs |