--:--









Quiz for Bit fields

Course: C Language | Subject: Unit 10 | Topic: Advanced Topics



Logo

Q1: What is a bit field in C?

Logo

Q2: Which keyword is used to declare a bit field in a struct?

Logo

Q3: How is a bit field declared in a struct?

Logo

Q4: Can bit fields be of type int only?

Logo

Q5: What is the maximum number of bits allowed in a bit field?

Logo

Q6: Are bit fields portable across different compilers?

Logo

Q7: Can bit fields be used for flags?

Logo

Q8: What happens if bit field width is zero?

Logo

Q9: Can bit fields cross byte boundaries?

Logo

Q10: How do you access bit fields?

Logo

Q11: Can you take the address of a bit field?

Logo

Q12: What is a common use case for bit fields?

Logo

Q13: Can bit fields be declared as volatile?

Logo

Q14: Which type qualifier can be combined with bit fields?

Logo

Q15: What is a limitation of bit fields?

Logo

Q16: Can bit fields be initialized inside the struct declaration?

Logo

Q17: What does the following mean: unsigned int flag:1;

Logo

Q18: How is padding handled with bit fields?

Logo

Q19: Are bit fields guaranteed to be atomic in access?

Logo

Q20: Which C standard introduced bit fields?

Are you ready to start test? Set your time limit