C++ – Data Types

There are many fundamental types that are built into C++.

A bool represents a true or false value.

A char represents a narrow character. An example of this would be the letter “a”.

double represents double precision (number of digits in a number) floating point (fractional parts) number.

float represents a single-precision (number of digits in a number), floating point (fractional parts) number.

long double represents an extended-precision, floating-point number.

signed char represents a signed (can represent both positive and negative numbers) byte

signed int represents an an integer that is natural for the host environment.

signed long int represents an integer whose range is at least as long as that of int

signed short int represents an integer that the range of the int is at least as large as a short

An unsigned char represents an unsigned (can hold large positive values but not negative) byte.

An unsigned int represents an unsigned (can hold large positive values but not negative) byte.

An unsigned long int represents an unsigned long integer.

An unsigned short int represents an unsigned short integer.

 

<< Declarations

Expressions >>

%d bloggers like this: