Home
writing business letters lesson plan
Write a program to find out the range of all data types in c++

We will use a formula to calculate a minimum range and a maximum range for the data types like short, char, int and long. Hence, for a char variable of 1 byte, minimum range is and the maximum range is Hence, the range of values for short data type is to Floating Point: Floating Point data type is used for storing single precision floating point values or decimal values.

Note : By default, any floating point value defaults to data-type double, hence an f suffix is used to denote a literal of type float.

The unsigned int data type is used to store only positive integer values. Maximum Range- It is the maximum value that can be stored in a data type.

It stores double more positive short integer values than an short data type, because the highest bit which is usually occupied to store the sign of an integer value is now free and not used to store the sign of the integer.

Rated 5/10
based on 3 review

Download
C++ Primitive Data Types