Function prototype in C programming

Function prototype in C programming: Importance

Function prototype in C is used by the compiler to ensure

whether the function call matches the return type

and the correct number of arguments or parameters with its data type of the called function.

In the absence of the function prototype,

a coder might call function improperly without the compiler detecting errors

that may lead to fatal execution-time errors that are difficult to detect.

Syntax of function prototype in C programming:

return_type function_name( type argument1, type argument2, ...);

猜你喜欢

转载自www.cnblogs.com/JasperZhao/p/12897974.html