C plus plus programming
June 3, 2026 1 min read

Data Types in C++: Built-in, User-Defined, and Derived Data Types with Size and Range

HS
HEMANT SINGH
Technical Writer & Educator
  1. Data types
    1. Built in data type
      1. Integral 
        • int
        • char
      2. Void
      3. Floating type
        • float
        • double
    2. User defined data type
      1. structure
      2. union
      3. classes
      4. enumeration
    3. Derived data type
      1. array
      2. function
      3. pointer
      4. reference

Size and range of data types in C++

Type

Range

Size

short int

2

-32768 to 32767

int

2

-32768 to 32767

long int

4

-2147483648 to -2147483647

unsigned int

2

0 to 65535

float

4

3.4 e-38 to 3.4e+38

double

8

1.7e-308 to 1.7e+308

long double

10

3.4e-4932 to 1.1e+4932

char

1

-128 to 127

unsigned char

1

0 to 255

In this category