Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

C | Functions | Question 8

  • Difficulty Level : Easy
  • Last Updated : 28 Jun, 2021

What is the meaning of using extern before function declaration?

For example following function sum is made extern

Take a step-up from those "Hello World" programs. Learn to implement data structures like Heap, Stacks, Linked List and many more! Check out our Data Structures in C course to start learning today.
extern int sum(int x, int y, int z)
{
    return (x + y + z);
}

(A) Function is made globally available
(B) extern means nothing, sum() is same without extern keyword.
(C) Function need not to be declared before its use
(D) Function is made local to the file.


Answer: (B)

Explanation: extern keyword is used for global variables. Functions are global anyways, so adding extern doesn’t add anything.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :