---
title: 1.3 Basic Data Types
description: "C++ provides fundamental data types for storing different kinds of values. Integer and floating-point types are used to represent numeric data, while character types store individual characters. This example demonstrates how variables of different built-in data types are declared, initialized,…"
url: "https://edcret.in/docs/cpp-programming/basic-refreshers-cplusplus/1-3-basic-data-types-2/"
updated: "2026-07-28"
category: C++ Programming / Basic Refreshers
---

# 1.3 Basic Data Types

C++ provides fundamental data types for storing different kinds of values. Integer and floating-point types are used to represent numeric data, while character types store individual characters.

This example demonstrates how variables of different built-in data types are declared, initialized, and displayed using the standard output stream.

## Source Code

```
#include <iostream>

int main()
{
    int account_number = 1024;
    float amount = 100.5f;
    char currency = '$';

    std::cout << "Mr. Cat with account number "
              << account_number
              << " owes me "
              << amount
              << " "
              << currency
              << '\n';

    return 0;
}
```

## Output

```
Mr. Cat with account number 1024 owes me 100.5 $
```

## Explanation
