Back To C Basics Index
a global variable can be accessed from any function in the program, a global variable is common to all functions
//program to demonstrate global variables #include
#include
int a=10; void print() { printf("\nvalue of a is %d",a); a++; } void main() { clrscr(); print(); a++; printf("\nvalue of a is %d",a); getch(); }