1.

What is the use of the set() function in bitset?(a) Used to make alternate bits zero(b) Used to make a bit 0 in a bitset(c) Used to make all bits zero(d) Used to set bit(s) in a bitsetI had been asked this question by my school principal while I was bunking the class.This intriguing question comes from Bitset in section Class Hierarchies, Library & Containers of C++

Answer» CORRECT choice is (d) Used to set bit(s) in a bitset

The EXPLANATION: header PROVIDES the set() FUNCTION to set bit(s) to 1 in a bitset variable.


Discussion

No Comment Found

Related InterviewSolutions