EXTERNAL STORAGE CLASS

external storage class is used to declare variable that are defined in other source file it is used to provide reference to a global variable that is defined in another class.

Storage -> memory

Default initial value -> zero

Scope -> global

Life -> as long as the program execute does not come to an end.

Ex

#include<stdio.h>

int x=21;

int main()

{

  extern int y;

  printf(“%d %d”, x , y);

  return 0;

}

int y=31;

Output:21 31