Declarations and Initializations

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

A Both are identical

B
int fun(); is overrided with extern int fun();

C
No difference, except extern int fun(); is probably in another file

D None of these

ANS:A - Both are identical

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.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.