Home » C Programming » Declarations and Initializations

Is there any difference between following declarations? 1 : extern int fun(); 2 : int fun();

Correct Answer: No difference, except extern int fun(); is probably in another file

Explanation:

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.


← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion