0

how can we invoke global variable in C program? ....P.S. I KNOW HOW TO DO IN C++ but not sure about C......

For eg: int global=0; int main() ៛ int global=16; print("%d",global)........it will always show the inner global 's value

26th Jun 2018, 9:15 AM
[ ]
[     ] - avatar
2 ответов
+ 6
#include <stdio.h> int global = 3939; int main() { int global = 1; { extern int global; printf("%d", global); } }
26th Jun 2018, 9:37 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
thanks Hatsy Rei
26th Jun 2018, 9:43 AM
[ ]
[     ] - avatar