Reputation: 1
I have int a[]
in one C file. Now in another .c file I have extern int *a
.
I need to know what will be the behavior if I try to access variable a
in second file and why?
What all problems would occur?
Upvotes: 0
Views: 308
Reputation: 4245
If you include the file(declaration) twice or declared variable named a, then there may be error redefinition of a;
when i tried the above compiler shows error :
conflicting types for a;
//previous definition in other file...
Upvotes: 0