I have Googled and read, but didn't find answers for these three simple questions...
Should header file name be equal to code file name? For example, I have function void foo() declared in foo.h. It is used in main.c which includes foo.h Must foo() be implemented in foo.c? What if it would be implemented in foox.c? Because I have a source code that has decoder.h header but decode.c code file and everything seems to work. There is no decoder.c nor decode.h files in the project.
What is "extern" used for when functions are declared with "extern". In the said project, decoder.h declares extern functions while decode.c implements them. How does extern works here and how is it actually supposed to work? I always thought extern is used to let the compiler know it will find this somewhere else (like I declare a variable in main.c, which includes foo.h, in foo.c which implements functions from foo.h I want to change that variable's value, so I declare it as extern).
Also, minor question on C syntax, I have a code that has function implementations that look like this
int function(param1,param2,param3) int param1,*param2; char param3; { function body }
My Qt Creator complains about this code and code navigation does not work, but the code compiles and executes well. What is this syntax? I have never seen it before...