is array b considered an external variable .please clarify

is array b considered an external variable .please clarify

int b[5];

main(){

int i;

for(i=0;i,5;i++)

printf("%d",b[i]);

}

 

3Comments
Saptarshi pal @saptarshipal
10 Jan 2015 07:52 pm

C follows static scoping. So b must be an external variable. If b is in some other files, then you are supposed to use the extern keyword.

sharat @sharat
10 Jan 2015 08:02 pm

can u please elaborate static scoping with example and does c support dynamic scoping too.can u please clarify

sharat @sharat
10 Jan 2015 08:02 pm

can u please elaborate static scoping with example and does c support dynamic scoping too.can u please clarify

Pages