1.

What happens when only one argument is supplied to set() function?(a) All bits are set to 1 in a bitset(b) Bit corresponding to an argument is set to 1(c) All alternate bits are set to 1 in a bitset(d) First bit is set to 1I got this question during an online interview.My question is taken from Bitset in chapter Class Hierarchies, Library & Containers of C++

Answer»

Correct answer is (b) Bit corresponding to an argument is SET to 1

The BEST explanation: When only one argument is supplied to set() function then bit corresponding to that INDEX is set to 1.



Discussion

No Comment Found

Related InterviewSolutions