C examples for Function:Global Variable
Create global variable outside any function
#include <stdio.h> int x = 9;/*from ww w .ja v a 2 s . c o m*/ void print_value(void) { printf("%d\n", x); } int main( void ) { printf("%d\n", x); print_value(); return 0; }