C Programming Reference >> C Basic Tutorials >> C Keywords Home >> externui 30/12/06 - Views - Ratings : extern is a storage class specifer ie. its used for modfying meaning of the variable during declaring it . It allows you to declare variables without defining them. In layman terms this means that it tells the compiler that the variable has been defined somewhere else and he have to look for a match. Varible can be a global variable of same or other files. Code - void function (void)
{
extern int a;
printf ("%d" , a); \\ Displays 10;
}
int a = 10;
|