C

Asked • 05/08/19

How to correctly use the extern keyword in C?

My question is about when a function should be referenced with the `extern` keyword in C.I am failing to see when this should be used in practice. As I am writing a program all of the functions that I use are made available through the header files I have included. So why would it be useful to `extern` to get access to something that was not exposed in the header file?I could be thinking about how `extern` works incorrectly, and if so please correct me.**Edit:** Should you `extern` something when it is the default declaration without the keyword in a header file?

1 Expert Answer

By:

Shompod A. answered • 05/08/19

Tutor
New to Wyzant

Love to teach, love to learn

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.