C Programming and Technical Programming Technical

int main()
{
struct value
{
int bit1:1;
int bit3:4;
int bit4:4;
}bit;
printf("%dn", sizeof(bit));
return 0;
}

A. 1 B. 2
C. 4 D. 9

Read Solution (Total 5)

C Other Question

#include

int main()
{
struct value
{
int bit1:1;
int bit3:4;
int bit4:4;
}bit={1, 2, 13};

printf("%d, %d, %dn", bit.bit1, bit.bit3, bit.bit4);
return 0;
}

A. 1, 2, 13 B. 1, 4, 4
C. -1, 2, -3 D. -1, -2, -13
#include

int main()
{
struct byte
{
int one:1;
};
struct byte var = {1};
printf("%dn", var.one);
return 0;
}

A. 1 B. -1
C. 0 D. Error