C Programming - Declarations and Initializations - Discussion

Discussion Forum : Declarations and Initializations - General Questions (Q.No. 4)
4.
Is there any difference between following declarations?
1 : extern int fun();
2 : int fun();
Both are identical
No difference, except extern int fun(); is probably in another file
int fun(); is overrided with extern int fun();
None of these
Answer: Option
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.

Discussion:
56 comments Page 5 of 6.

Arzoo said:   1 decade ago
Please explain function using extern keyword with proper example.

Bhargavi said:   7 years ago
Please tell the difference between extern and static, automatic.

Pradeep said:   1 decade ago
Does storage classes can be used with data types and keywords.

Harvansh singh said:   9 years ago
What is the actual meaning of extern keyword? Explain clearly.

Shobhit said:   2 decades ago
I don't understand the extern. please tell me what is extern.

Bhyresh said:   9 years ago
What is the difference between int main and extern int main?

Neha said:   7 years ago
I am not understanding this, please explain it for me.
(1)

Prakash said:   1 decade ago
Then 'extern' keyword not understand, please explain.

Preethe said:   1 decade ago
What is meant by global variables? please explain.

Ganesh said:   1 decade ago
Extern keyword not understand, please explain.


Post your comments here:

Your comments will be displayed after verification.