Storage Class in C
C storage class is used to define the scope variables and function. There are four various types of storage classes that are given below.
- auto:
{ int mount; auto int month; }
- static:
#include <stdio.h> void abc() { int j=0;//local variable static int i=0;//static variable++; j++; printf("i= %d and j= %d\n", i, j); } void main() { abc(); abc(); }
- extern
extern int counter=0;