Other data types

There are more data types in C:

Figure: More variables declaration
Image long

Smallest size memory you can allocate is one byte, and memory is always 8, 16, 32, 64 bytes sizes and no in between, in all the modern computers.

Different types of variables consume different amount of space in memory (i.e., Random Access Memory (RAM)) of the computer.

Short: 1 byte
Character: 1 byte
int : 2 bytes
long : 4 bytes
double: 8 bytes
long double: 16 bytes

Examples of bytes are: 0000 0000, 0000 0001, ..., 1111 1111. Note that each one is of fixed length 8 bits.

Though we can do computations using hexadecimal, octal, and binary as well as print the in their formats, but there are no data types like binary, octal and hexadecimal.

Figure: Running the more variables program
Image long-op

Figure: Sizes of data types
Image sizes

Figure: Running Sizes program
Image sizesrun