Calculate the % of memory saved when bit-fields are used for the following C structure as compared to with-out use of bit-fields for the same structure? (Assuming size of int = 4)
struct temp
{
int a : 1;
int b : 2;
int c : 4;
int d : 4;
}s;
struct temp
{
int a : 1;
int b : 2;
int c : 4;
int d : 4;
}s;
A. 25%
B. 33.3%
C. 50%
D. 75%
Answer: Option D
Join The Discussion