C Data Types: Range & Size

December 29, 2009

We have already discussed the Data Types in C in the previous tutorial.

The following Chart will give you the range & sizes of all the data types in C Language along with their Type Modifiers.

Data Type

Range

Bytes

signed char -128 to + 127 1
unsigned char 0 to 255 1
short signed int -32768 to +32767 2
short unsigned int 0 to 65535 2
signed int -32768 to +32767 2
unsigned int 0 to 65535 2
long signed int -2147483648 to +2147483647 4
long signed int -2147483648 to +2147483647 4
long unsigned int 0 to 4294967295 4
float -3.4e38 to +3.4e38 4
double -1.7e308 to +1.7e308 8
long double -1.7e4932 to +1.7e4932 10

This Chart will help you in greater extent in finding the exact range & size of the data types in C Language.

C Language Data Types

December 25, 2009

Data Types in C Language

Data can be of many types e.g., integer, fraction or real, character, string etc.

  • Numbers that does not have fraction part represents integer data.
  • Numbers with decimals or fraction represents real data.
  • Any data which is enclosed within single quotes represents character data.
  • Any data which is enclosed within double quotes represents a string.

Since the data is of many types, therefore C language provides many ways and options to handle all kind of data.

C Programming Language provides ways to handle different types of data by providing data types. WAIT! There is more to read… read on »

TopOfBlogs