Is there any difference between following declarations?
1 : extern int fun();
2 : int fun();
A. Both are identical
B. No difference, except extern int fun(); is probably in another file
C. int fun(); is overrided with extern int fun();
D. None of these
Answers
Answered by
1
There is no difference between the two,except extern int fun(); is probably in another file.
Reason:-
Reason:-
extern int fun(); -> It is a declaration in C to indicate the existence of a global function and so is defined externally in another file.
int fun(); -> It is a declaration in C used to indicate the existence of a function inside the current module or in the same file.
Answered by
2
[B].No difference, except extern int fun(); is probably in another file.
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.
Similar questions
English,
8 months ago
Social Sciences,
8 months ago
World Languages,
1 year ago
French,
1 year ago
Geography,
1 year ago