1.

Which of the following is correct about none() function in bitset?(a) Returns true if any bits is set 1(b) Returns true if all bits is set 0(c) Returns true if the number of 1’s equal to the number of 0’s(d) Returns true only if all bits are 1

Answer» Correct choice is (b) Returns true if all bits is set 0

Easiest explanation - header provides the any() function which returns true if none of the bit is set to 1 in the bitset variable.


Discussion

No Comment Found

Related InterviewSolutions