Ticker

6/recent/ticker-posts

Format Specifiers

Format Specifiers - 

These tell about the data type that we enter in the program. 
We have to specify the data every time we input the values. There is specific formats for every data type.

These are as follows -

 Image result for format specifiers in c


Storage size of the respective data type - 

C Data types / storage SizeRange
char / 1–127 to 127
int / 2–32,767 to 32,767
float / 41E–37 to 1E+37 with six digits of precision
double / 81E–37 to 1E+37 with ten digits of precision
long double / 101E–37 to 1E+37 with ten digits of precision
long int / 4–2,147,483,647 to 2,147,483,647
short int / 2–32,767 to 32,767
unsigned short int / 20 to 65,535
signed short int / 2–32,767 to 32,767
long long int / 8–(2^(63) –1) to 2^(63) –1
signed long int / 4–2,147,483,647 to 2,147,483,647
unsigned long int / 40 to 4,294,967,295
unsigned long long int / 82(power)64 –1
These later vary on machine. like if you have 16 bit or 32 bit machine and like that. 

Post a Comment

0 Comments