In C++, bool data type is used to hold how many values?
20212021
In C++, bool data type is used to hold how many values?
- A.
n²
- B.
2
- C.
2n
- D.
2n
Attempted by 314 students.
Show answer & explanation
Correct answer: B
In C++, the bool data type is used to store only two possible values:
truefalse
Since it can hold only these two values, the correct answer is 2.