1.

What is bitset in C++?(a) An array of bools consuming one bit per element(b) Vector of bools(c) C-like arrays of bool elements(d) Template classI have been asked this question at a job interview.I'm obligated to ask this question of Bitset in chapter Class Hierarchies, Library & Containers of C++

Answer»

Right choice is (a) An array of BOOLS consuming one bit per ELEMENT

To explain I would say: Bitset is a COLLECTION of BOOL variables with each element consuming only one bit. They are introduced for efficient use of MEMORIES.



Discussion

No Comment Found

Related InterviewSolutions