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.

Also.. Should you extern something when it is the default declaration without the keyword in a header file?

10 Answers
10

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *