Importance of Function prototype in C

Function prototype tells the compiler about a number of parameters function takes data-types of parameters, and return type of function. 
By using this information, the compiler cross-checks function parameters and their data type with function definition and function call. 
If we ignore the function prototype, a program may compile with a warning and may work properly. 
But sometimes, it will give strange output and it is very hard to find such programming mistakes.

Hope you leant something new..!


Posted on by