Sail E0 Webinar
Question

Is there any difference between following declarations?

1: extern int fun();

2: int fun();


Options:
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
Answer: Option B

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.




Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers