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
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
Which of the following can be a member of a structure?
A. Function
B. Another structure
C. Enumeration
D. All of the above
Join The Discussion