1.

What happens when no argument is supplied to set() function?(a) All alternate bits are set to 1 in a bitset(b) All bits are set to 0 in a bitset(c) All bits are set to 1 in a bitset(d) First bit is set to 1The question was posed to me in an online quiz.The question is from Bitset in chapter Class Hierarchies, Library & Containers of C++

Answer»

The CORRECT OPTION is (c) All bits are set to 1 in a bitset

The EXPLANATION: When no argument is SUPPLIED to set() function i.e. function is CALLED with empty parameters then all the bits of the bitset is set to 1.



Discussion

No Comment Found

Related InterviewSolutions