A primitive type is a data type where the values that it can represent have a very simple nature (a number, a character or a truth-value); the primitive types are the most basic building blocks for any programming language and are the base for more complex data types.
C++ has the following primitive data types −
| S.No | Type | Description |
|---|---|---|
| 1 | bool | Stores either value true or false. |
| 2 | char | Typically a single octet (one byte). This is an integer type. |
| 3 | int | The most natural size of an integer for the machine. |
| 4 | float | A single-precision floating point value. |
| 5 | double | A double-precision floating point value. |
| 6 | void | Represents the absence of type. |