C Programming Reference


C Programming Reference >> C Basic Tutorials >> C Keywords Home >>

externui

30/12/06 -  Views - Ratings :   3.48 of 5 / 155 Votes   

 

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;

Back To Top


      

 

 

© 2006 cencyclopedia.com