Definition of Bool

Definition of Bool

We are searching data for your request:

Forums and discussions:
Manuals and reference books:
Data from registers:
Wait the end of the search in all databases.
Upon completion, a link will appear to access the found materials.


Bool is a fundamental type in C, C++ and C# languages.

Variables of this type can only take two values- 1 and 0. In C++ these correspond to true and false and can be used interchangably. In C# bool variables can only use true and false, they are not interchangeable with 1 and 0.

Boolean variables can be packed together to save memory space. An understanding of binary can be a useful skill.

Note Because of the way false and 0 are usually treated the same (except in C#), any non zero value is the same as true, not just 1.

Also Known As: Boolean

Examples: Using a bool and checking for true/false improves readability of your program


  1. Dennet

    What words ... Super, brilliant sentence

  2. Hadden

    To merge. I agree with all of the above-said.

  3. Hartmann

    Can I ask at your place?

  4. Yojas


  5. Tillman

    Does everyone have private messages sent today?

Write a message