TCS
Company
Programming
Program
Is there any difference between following declarations ?
(i) : extern int fu ();
(ii) : int fun();
A)Both are identical B)No difference except ectern int fun(); is probably in another file C)int fun() is overrided with extern int fun(); D)None of these
Read Solution (Total 5)
-
- b
extern is keyword is only used when we used the keyword from the another file - 4 years agoHelpfull: Yes(2) No(0)
- option B
extern means in another file it is present but except that no difference - 4 years agoHelpfull: Yes(2) No(0)
- First type the question correctly. Ans is "A"
- 4 years agoHelpfull: Yes(1) No(3)
- Both are IDentical as Extern is a Storge Class so the extern int fun() is located in other storage area
- 4 years agoHelpfull: Yes(0) No(0)
- 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. - 3 years agoHelpfull: Yes(0) No(0)
TCS Other Question