Monday, 24 September 2018

Storage Classes (Register)

Register storage classes are used to stored the local variable in CPU register not in memory.

Default Value :-

  • Default Value of register storage classes is garbage.
  • We can declare it locally
Memory :-

  • Register storage class variable are always stored in CPU register
Scope :-
  •  Scope of register storage class variable is within a block or braces.  
Life :-

  • Life of register is same as an auto storage class.

Important Note  :-

We can not use the address of register storage classes variable because it stored in CPU.
Register storage class is fastest of all four storage type.

Function arguments are of register storage class.