Home » C Programming » Bit Fields » Question
  1. What is the correct syntax to initialize bit-fields in an structure?
    1. struct temp
      {
      unsigned int n = 1;
      }s;
    2. struct temp
      {
      unsigned float n : 1;
      }s;
    3. struct temp
      {
      unsigned int n : 1;
      }s;
    4. All of above
    5. None of these
Correct Option: C

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



Your comments will be displayed only after manual approval.