Code it ALL
C Data Types - CodeGK
♦ C Data Types

♣ About C Data Types

Data 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 C

C has numerous Built-IN Data Types.
Table Info
Basic TypesThese are arithmetic types and are further classified into: (a) integer types and (b) floating-point types.
Enumerated typesThey are again arithmetic types and they are used to define variables that can only assign certain discrete integer values throughout the program.
The type voidThe type specifier void indicates that no value is available.
Derived typesThey include (a) Pointer types, (b) Array types, (c) Structure types, (d) Union types and (e) Function types.

♣ Types & Their sizes

Below is a tabular explanation of Data Types
Table Info
TypeStorage sizeValue Range
char1 byte-128 to 127 or 0 to 255
unsigned char1 byte0 to 255
signed char1 byte-128 to 127
int2 or 4 bytes-32,768 to 32,767 or -2,147,483,648 to 2,147,483,647
unsigned int2 or 4 bytes0 to 65,535 or 0 to 4,294,967,295
short2 bytes-32,768 to 32,767
unsigned short2 bytes0 to 65,535
long8 bytes-9223372036854775808 to 9223372036854775807
unsigned long8 bytes0 to 18446744073709551615