C
chump1708
union u
{
struct st
{
int i : 4;
int j : 4;
int k : 4;
int l; // or int l:4
}st;
int i;
}u;
main()
{
u.i = 100;
printf("%d, %d, %d",u.i, u.st.i, u.st.l);
}
ok...the answer is 100,4,0...
can anyoone explain the program and bit fields??
{
struct st
{
int i : 4;
int j : 4;
int k : 4;
int l; // or int l:4
}st;
int i;
}u;
main()
{
u.i = 100;
printf("%d, %d, %d",u.i, u.st.i, u.st.l);
}
ok...the answer is 100,4,0...
can anyoone explain the program and bit fields??