Since the compiler scans your code from top to bottom without ever looking ahead, you'll get an error when you call a function that is declared later:
Code:
int main()
{
  func(4);  // error: the compiler doesn't know the name "func"
  return 0;
}

void func(int i)
{
// do something
}
This is where "function prototypes" come in. A function prototype looks like the normal function definition except that it has no code. It's purpose is just to tell the compiler that there indeed is such a function. The prototype for the "func" above would be:
void func(int i);

You don't need to specify a name for the parameter, so this would be legal too:
void func(int);


A header file is usually a collection of function prototypes and type definitions.