bitset any() in C++ STL
The bitset::any() is an inbuilt function in C++ STL which returns True if at least one bit is set in a number. It returns False if all the bits are not set or if the number is zero.
Parameter: The function does not accepts any parameter.
Return Value: The function returns a boolean value. The boolean value thus returned is True if any of its bits are set. It is False if none of its bits are set.
Below programs illustrates the bitset::any() function.
1100 has a minimum of one-bit set 000000 does not have any bits set
11 has a minimum of one-bit set 000 does not have any bit set
My Personal Notes arrow_drop_up
Please Login to comment...