It's called prototyping. Basically what you are doing is telling the compiler how to ensure the function is being called correctly. If you don't provide a prototype one is automatically created as returning an int and taking unknown parameters. That can create problemsThere are two problems in the code above.
1. You need to Declare the function first before main().
You can also use an inline function. Which has slightly different syntax.Code:void samplefunc(); void main(){ } void samplefunc(){ printf("Function Definition "); }
And the second one is you do not pass Arrays as arguments like that.