Javatpoint Logo
Javatpoint Logo

C++ bitset size() Function

C++ bitset size() function is used to check the size of the bitset. It returns the number of bits in the bitset.

Syntax

Parameter

It does not take any parameter.

Return value

It returns the number of bits in the bitset.

Example 1

Output:

size of bitset b : 8
size of bitset b1 : 6

Example 2

Output:

size of bitset b : 8
size of bitset b1 : 4
Next TopicC++ bitset



Help Others, Please Share

facebook twitter pinterest