You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
179 B
C

#include <stdio.h>
union u_tag {
int ival;
float fval;
char *sval;
} u;
int main() {
u.ival = 12;
printf("%f\n", u.fval);
u.fval = 0.01;
printf("%d\n", u.ival);
}