Examveda

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;

A. 25%

B. 33.3%

C. 50%

D. 75%

Answer: Option D


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union