Type Modifiers: (signed, unsigned, short, long)

                    A type modifier alter the meaning of the base data type.
                    1. Each of these type modifiers can be applied to the base type int.
                    2. Type modifiers signed and unsigned can also be applied to the base type char.
                    3. In addition, long can be applied to double.

Sub classification of Primary data types, format specifiers, memory size and their accessibility range:

Data type Format Specifier Memory Size Accessibility Range
unsigned char %c 1 Byte 0 to 255
char %c 1 Byte -128 to 127
int %d 2 Bytes -32768 to 32767
unsigned int %u 2 Bytes 0 to 65535
long
(or)
 long int
%ld 4 Bytes -2147483648
to
 2147483647
unsigned long
(or)
 unsigned long int
%lu 4 Bytes 0 to 4294967295
float %f 8 Bytes 3.4*(10 power -38)
 to 
3.4*(10 power -38)
double %lf 8 Bytes 1.7*(10 power -308)
to
1.7*(10 power -308)
long double %Lf 10 Bytes 3.4*(10 power -4932)
to
3.4*(10 power 4932)
char[]
(string)
%s - -



Next Topic        :  Variable

Previous Topic :  Data Types in C

No comments:

Post a Comment