C – Storage Classes

tutorial and example
tutorial and example

C storage class is used to define the scope variables and function. There are four various types of storage classes that are given below.

  1. auto:

The auto keyword is the default storage class for all the local variables. Let us consider an example.

  1. static:

In C language, static storage class is initialized only once time and use until when the program will be closed. It has default value 0.

  1. extern

The extern variable is used to share two or more variables or function.