Javatpoint Logo
Javatpoint Logo

C++ bitset reset() Function

C++ bitset reset() function is used to reset all the bits of bitset. If you are giving index as a parameter then it will reset bit of that index.

Syntax

Parameter

Index: It takes one parameter as an index but it is not mandatory.

Return value

This function does not return any value.

Example 1

Output:

before applying reset method : 1001
after applying reset method : 0000

Example 2

Output:

before applying reset method : 1001
after applying reset method : 0001
after applying reset method : 0000
Next TopicC++ bitset



Help Others, Please Share

facebook twitter pinterest