Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #include <stdlib.h>
- #include <time.h>
- #include <string.h>
- union{
- int a;
- char c;
- double d;
- //struct{
- // unsigned b : 1;
- // unsigned c : 1;
- //};
- }x;
- // union avec int car double dans une union
- int main()
- {
- x.a=9;
- x.a="A"; //afficher en caractere %c , %d en nombre
- printf("%d\n",x.a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement