Though you have to define a function before using it, it’s not entirely true. You can notify the compiler in advance that you’ll be using a function of a certain type that has a certain parameter list, and that way the function can be defined anywhere at all — as long as the function prototype has been declared first.
#include <stdio.h>
int foo(void); /* this is the prototype */
int main(void){ int i;
i = foo();
return 0;}
int foo(void){ /* this is the definition, just like the prototype*/ return 45;}