Point 1:
In C
, functions are global by default.
There is no concept of private
in C
. FWIW, there is static
, however, which limits the scope of the function to the translation unit only . See this previous question and the answers for some clarifiction.
Point 2
You get this error in linking state. When all the translation units have been compiled and about to be linked together, linker can see more than one definition of the function and hence throws the error.
Point to note: You don't define functions in header files. you declare them, and as long as declarations don't conflict, you can have any number of declarations even inside a single translation unit.