Which of the following data types are accepted while declaring bit-fields?

Category: QuestionsWhich of the following data types are accepted while declaring bit-fields?
Editor">Editor Staff asked 11 months ago

Which of the following data types are accepted while declaring bit-fields?
 
(a) char
 
(b) float
 
(c) double
 
(d) none of the mentioned
 
The question was posed to me in an interview.
 
My query is from Bit-fields topic in portion Structures, Unions and Bit-Fields in C of C
NCERT Solutions for Subject Computer science (C Programming) Select the correct answer from above options 
Interview Questions and Answers, Database Interview Questions and Answers for Freshers and Experience

1 Answers
Editor">Editor Staff answered 11 months ago

The correct answer is (a) char
 
Explanation: None.