If you wrote the definition before the main means first it will treated as function declaration after calling it will execute
I hope u wrote code like this
Ex:
#include<stdio.h>
int add(int a,int b)
{
return a+b; }
Main()
{
int i=10,j=20,k;
K=add(i,j) ;
Printf("%d",k);}