Dear Student,
A function declaration is like a variable declaration; its purpose is simply to provide the compiler with all the information it needs for that particular function which we want to use in our program. The compiler does not need to know how the function works (its body). It only needs to know the function’s name, the number and types of its parameters, and its return type. This is precisely the information contained in the function’s declaration. Suppose we have a function which takes two integer type values and then return their sum which is also in integer type so its function declaration is given below:
int sum(int, int);
looking at the above function declaration, we can know that this function named "sum" takes two arguments of integer type and return an integer type value. Function declaration is also called function prototype.
On the other hand, Function definitions differ from function declarations in that they supply function bodies — the code that makes up the function. Function definition for above mentioned is given below:
int sum(int a, int b)
{
int c = a + b;
return c;
}