Implicit function declarations sometimes work in C?
Can someone please explain to me why the following compiles: int main() { int a = mymethod(0); } int mymethod(int b) { return b; } but this does not: int main() { mymethod(0); } void mymethod(int b) { return; } I thought that forward declarations were required in C/C++, yet here is a counterexample. How do implicit declarations work in C? I assume when you say that it does not work in the second code example, you mean that you get a compile time error. The reason is that when there is an implicit function declaration, it is assumed to take a fixed number of arguments, and return int . However,