Please help me with this program ,i have a final exam tomorrow and i literally don't know whats going to happen.
#include<stdio.h>
#include<conio.h>
struct byte1
{
unsigned char a13:1;
unsigned char a22:2;
unsigned char a64:3;
unsigned char a75:2;
};
union byteu
{
unsigned char c;
struct byte1 b;
};
void printbyte(char c)
{
byteu u;
u.c=c;
printf("%d",u.b.a13);
printf("%d",u.b.a22);
printf("%d",u.b.a64);
printf("%d",u.b.a75);
}
void main()
{
byteu u;
u.c=26;
u.b.a13=22;
u.b.a64=23;
u.b.a75=22;
u.b.a22=74;
u.b.a13=u.b.a64;
printbyte(u.c);
}
Please explain whats actually happening in the program.