C – Storage Classes

C – Storage Classes 2017-08-06T10:16:12+00:00

Storage Classes in C:

  • By the declaration statement the memory is allocated temporarily for all the variables. The size of memory varies with respect to the type of the variable. The availability of the variables for access depends on its declaration type.The storage classes specifiers are used to specify the life and scope of   the  variables with in blocks, functions and the entire program.
  • There are 4 types of storage classes supported by C language Namely
Storage Classes Description
Static  Storage Class Static variables can be  declared within a function. These variables retain their values from the previous call. i.e., the value that they had before returning from the function.
Register Storage Class Register variables are stored in the register of the microprocessor. The number of variable which can be declared register are limited.
Automatic Storage Class Automatic variables are allocated space in the variable on the stack. To declare a variable automatic storage class auto specified.
External Storage Class External variables are global to the file in which they are defined. External variables are used only when all functions needed a particular variable.

 

Prev Next