- Integer: is a whole number like 1 or 17.
- Character: is a letter or digit or punctuation mark enclosed in single.The most basic type is char, which is a one-byte character.
- Floating-point: numbers, which can represent fractions as well as integers.
-Float: holds a single–precision floating point value or a real number.
-Double: holds a single–precision floating point value or a real number.
- Boolean: known as bool, can only represent one of two states, true or false.
Sources:
- http://www.learncpp.com/cpp-tutorial/26-boolean-values/
- https://msdn.microsoft.com/en-us/library/cc953fe1.aspx
- http://www.cplusplus.com/doc/tutorial/variables/
- Book How to think like a computer scientist by Allen B. Downey
Basic types and their use in C++ by Andrea Ac is licensed under a Creative Commons Attribution 4.0 International License.