Javatpoint Logo
Javatpoint Logo

C++ bitset operator[] Function

C++ bitset function is used to access value to any index of a bitset.

Syntax

Parameter

pos: The parameter index specifies the position at which the value is to be assigned.

Return value

The function returns the value to the bit at the index.

Example 1

Output:

b :0110

Example 2

Output:

b :1111
Next TopicC++ bitset



Please Share

facebook twitter google plus pinterest