C Function Prototype
A function prototype is also known as a function declaration which specifies the function’s name, function parameters, and return type. The function prototype does not contain the body of the function. It is basically used to inform the compiler about the existence of the user-defined function which can be used in the later part of the program.
Syntax
return_type function_name (type1 arg1, type2 arg2, ... typeN argN);
We can also skip the name of the arguments in the function prototype. So,
return_type function_name (type1 , type2 , ... typeN);
User-Defined Function in C
A user-defined function is a type of function in C language that is defined by the user himself to perform some specific task. It provides code reusability and modularity to our program. User-defined functions are different from built-in functions as their working is specified by the user and no header file is required for their usage.
In this article, we will learn about user-defined function, function prototype, function definition, function call, and different ways in which we can pass parameters to a function.