Define local variable for a function
int i =0; //Global variable
void f(void);
main() {
int i ; // local variable for main
i =0;
printf("value of i in main %d\n",i);
f();
printf("value of i after call%d\n",i);
}
void f(void) {
int i=0; //local variable for f
i = 50;
}
Related examples in the same category