I need to access the value of variable a which is defined in main function without passing it as argument.
main()
{
int a=10;
func();
printf("%d\n",a);
}
void func(){
//i need access of variable a here.
}
How can i do this?
I need to access the value of variable a which is defined in main function without passing it as argument.
main()
{
int a=10;
func();
printf("%d\n",a);
}
void func(){
//i need access of variable a here.
}
How can i do this?