Examveda

What is the correct syntax to initialize bit-fields in an structure?

A.

struct temp
{
    unsigned int a : 1;
}s;

B.

struct temp
{
    unsigned int a = 1;
}s;

C.

struct temp
{
    unsigned float a : 1;
}s;

D. None of the mentioned

Answer: Option A


This Question Belongs to C Program >> Structure And Union

Join The Discussion

Related Questions on Structure and Union