C++ has several fundamental data types.
| Type | Size | Example |
|---|---|---|
| 4 bytes | 42 |
| 2 bytes | 100 |
| 8 bytes | 1000000L |
| 4 bytes | 3.14f |
| 8 bytes | 3.14159 |
| Type | Description |
|---|---|
| Single character |
| true/false |
| Text (needs ) |
int age = 25;
double price = 19.99;
char grade = 'A';
bool isActive = true;
std::string name = "Alice";
Interactive Visualization