♦ C Data Types
♣ About C Data TypesData Types are fundamentally classified based on the amount of memory for each Data Types.
Each Data Type can hold a different type of entity.
Some common occurring Data Types are int, float, string.
♣ Data Types in CC has numerous Built-IN Data Types.
|Basic Types||These are arithmetic types and are further classified into: (a) integer types and (b) floating-point types.|
|Enumerated types||They are again arithmetic types and they are used to define variables that can only assign certain discrete integer values throughout the program.|
|The type void||The type specifier void indicates that no value is available.|
|Derived types||They include (a) Pointer types, (b) Array types, (c) Structure types, (d) Union types and (e) Function types.|
♣ Types & Their sizesBelow is a tabular explanation of Data Types
|Type||Storage size||Value Range|
|char||1 byte||-128 to 127 or 0 to 255|
|unsigned char||1 byte||0 to 255|
|signed char||1 byte||-128 to 127|
|int||2 or 4 bytes||-32,768 to 32,767 or -2,147,483,648 to 2,147,483,647|
|unsigned int||2 or 4 bytes||0 to 65,535 or 0 to 4,294,967,295|
|short||2 bytes||-32,768 to 32,767|
|unsigned short||2 bytes||0 to 65,535|
|long||8 bytes||-9223372036854775808 to 9223372036854775807|
|unsigned long||8 bytes||0 to 18446744073709551615|