TCS
Company
Programming
Functions
Is there any difference between following declarations?
A : extern int fun();
B : int fun();
1.Both are identical
2.No difference, except extern int fun(); is probably in another file
3.int fun(); is overrided with extern int fun();
4.None of these
Read Solution (Total 2)
-
- extern int fun(); declaration in C is to indicate the existence of a global function and it is defined externally to the current module or in another file.
int fun(); declaration in C is to indicate the existence of a function inside the current module or in the same file. So the answer is option b - 6 years agoHelpfull: Yes(5) No(0)
- 2nd option is correct
- 5 years agoHelpfull: Yes(1) No(0)
TCS Other Question