Header Ads Widget

What is modifiers / different types of modifiers

                      Modifiers are keywords in C which changes the meaning of the basic data type. It specifies the amount of memory spaces to be allocated for a variable .Modifiers are prefixed with basic data types to modify the memory allocated for a Variable.

There are two type of modifiers in the C language.

1) Size modifiers:-
                               Size modifiers are the modifiers which increase or decrease the size of the data type . in C there are two type of size modifiers ( Short size modifiers and long size modifiers ) . It is applicable only on the int and double data types. 
  • short
  • long 
  • long long
In C int takes 4 bytes of memory ( for 32 bit gcc compiler ). and if we use size modifiers with the int then --

2) signed modifiers:-
                                  signed modifiers applied integer and character data types only . in the signed int both +ve and -ve values occur including zero. but in unsigned int only +ve value hold.

signed int a ;
signed char a;

unsigned int a;
unsigned char a;

Recommended Post:

Full C course:-    

Key points:-

Cracking the coding interview:-

 Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-


Post a Comment