A function prototype tells the compiler what kind of arguments a function is looking to receive and what kind of return value a function is going to give back. This approach helps the compiler ensure that calls to a function are made correctly and that no erroneous type conversions are taking place.
Prototype of the function tell compiler that we will use this function in our program and it will run even if we do not write code of function
prototype of function tells compiler about function behaviour it means due to prototype compiler knows for things 1.name of function:-it is the identifier which is used to call a function 2.type of function:-it tells which type of value function will return 3.no of argument:-it tells how many arguments are reuired to call a funtion 4.types of argument:-it tells types of arguments which are passed to a function
the user defined function which we are going to use,is not aware to compiler so first we have to tell the behaviour of function to compiler. when complier executes function protype code, then compiler knows that there is a function of this type used in the program.