Integral Types with Minimum and Maximum Values - C++ Data Type

C++ examples for Data Type:int

Introduction

Type Name Number of Bytes Minimum Value Maximum Value
char 1 -128 127
short 2 -32,768 32,767
int 4 -2,147,483,648 2,147,483,647
long 4 -2,147,483,648 2,147,483,647
long long 8 -9,223,372,036,854,775,808 9,223,372,036,854,775,807

Unsigned Integers

C++ supports unsigned versions of the integer types.

Type Name Number of Bytes Minimum Value Maximum Value
unsigned char 10 255
unsigned short 20 65,535
unsigned int 40 4,294,967,295
unsigned long 40 4,294,967,295
unsigned long long 80 18,446,744,073,709,551,615

Related Tutorials