Data Types - Bool And Void C++
Data Types - Bool And Void C++
Bool: Representing True or False
- Purpose: Stores Boolean values, indicating truth or falsehood.
- Values: Can hold only two possible values:
true
orfalse
. - Common Uses:
- Decision-making in control structures (e.g.,
if
statements) - Loop conditions
- Function return values
- Decision-making in control structures (e.g.,
Example:
void: Representing No Value