Whenever any variable declared outside the function then that variable are called as global variable or external variable.
EX: WAP to use of extern
#include<stdio.h>
#include<conio.h>
void fun();
extern int x;
void main(){
clrscr();
printf("x = %d ",x);
x=15;
fun();
getch();
}
void fun()
{
printf(" x = %d ",x);
}