/* Sa se afiseze reprezentarea interna a unei date de tip char folosind campurile pe biti */ #include #include union bitii { struct { unsigned b0:1; unsigned b1:1; unsigned b2:1; unsigned b3:1; unsigned b4:1; unsigned b5:1; unsigned b6:1; unsigned b7:1; } b; char c; }octet; void main() { printf("dati un caracter :");scanf("%c",&octet.c); printf("reprezentarea interna este: \n"); printf("%d%d%d%d%d%d%d%d \n",octet.b.b7, octet.b.b6,octet.b.b5, octet.b.b4, octet.b.b3, octet.b.b2, octet.b.b1, octet.b.b0); getch(); }