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?
Answer: B. 2 — In C++, the bool data type is used to store only two possible values: true false Since it can hold only these two values, the correct answer is 2.
- A.
n²
- B.
2
- C.
2n
- D.
2n
Attempted by 812 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.
Loading lesson…