1.

Which operator is used to access the nth bit in a bitset?(a) ->(b) [](c) .(d) *This question was addressed to me in quiz.The origin of the question is Bitset in portion Class Hierarchies, Library & Containers of C++

Answer»

The correct answer is (b) []

The best I can explain: [] operator is used to access the NTH bit of a bitset from the right SIDE. For EXAMPLE, if my bitset b is 1010 then b[0] represents 0 and b[1] represents 1.



Discussion

No Comment Found

Related InterviewSolutions