prototype of function

prototype of function:

prototype of the function is just the basic format of function, in the prototype we just decide datatype of function according to the return type of function and which type data type's and how many arguments is going to take when we want to execute the function.


Simply, the prototype is a blueprint of your function.


we put all prototype at top of code before the declaration of all functions including the main function because when the code is compiled the prototype is gives promise to the compiler that the function is declared anywhere in the program.


Don't worry if you don't get it, its became more clear with an example.


syntax:


ReturnType Function_Name(argument1, argument2, argument3 , ...)


Examples:


int max(int a,int b,int c);


void mul( float x, float y );