C examples for Function:Global Variable
Illustrates declaring external variables.
#include <stdio.h> int x = 9;/*from w w w .ja v a 2 s . co m*/ void print_value(void); int main( void ){ extern int x; printf("%d\n", x); print_value(); return 0; } void print_value(void){ extern int x; printf("%d\n", x); }