Can variable i be accessed by functions in another source file?

Can variable i be accessed by functions in another source file?

Can variable i be accessed by functions in another source file? mcq and its answer is provided on this page.

Can variable i be accessed by functions in another source file?

Que. Can variable i be accessed by functions in another source file?
a. #include int i; int main() { printf("%d\n", i); }
b. a) Yes
c. b) No
d. c) Only if static keyword is used
e. d) Depends on the type of the variable
Answer: a
Explanation : None.


Comments