C compiler supports some basic types. These are char, short, int, long, float, double, long double, long long, and user defined types like structure and union. We will discuss mainly these basic types here. Below table gives information on these types long with their size and ranges.

Type Size Signed Range Unsigned Range
char 1 -128 to 127 0 - 255
short 2 -32768 to 32767 0 - 65535
int 4 -2147483648 to 2147483647 0 - 4294967295
long 4 -2147483648 to 2147483647 0 - 4294967295
float 4 3.4E+38 to 3.4E-38 3.4E+38 to 3.4E-38
double 8 1.7E+308 to 1.7E-308 1.7E+308 to 1.7E-308
long double 10 1.7E+1032 to 1.7E-1032 1.7E+1032 to 1.7E-1032
long long(_int64) 8 -9223372036854775808 to 9223372036854775807 0 - 18446744073709551615

You have viewed 1 page out of 248. Your C learning is 0.00% complete. Login to check your learning progress.

 Vote 0

Similar topics related to this section

header files, library, compilation, pre-processing, compilation, optimization, linking format, debugging with GDB, structured programming language, data types, storage classes, volatile variable, external vs static, global vs static variable,

# C Programming Language (Prentice Hall Software)
# Let Us C Paperback - 2006 by Yashavant Kanetkar
# Understanding and Using C Pointers Core techniques for memory management
# Data Structures Using C and C++ Paperback - 1998
# Data Structures In C Paperback - August 11, 2008 by Noel Kalicharan