A function declaration is also called a function prototype. A function may be declared at the beginning of the main function. Function are classified into two types
1. Pre defined Function or Library Function
2. User defined Function

The difference between these two categories of function is Library function are not required to be written by the programmer. whereas the user defined function has to be written by the programmer at the time of programming.

Library Function

Library Functions are built-in functions in C programming.These functions are defined in the header file. When you include the header file, these functions are available for use.

For example:The printf() is a standard library function to send formatted output to the screen This function is defined in "stdio.h" header file.

User defined Function

The function defined by the users according to their requirements are called user defined function. The user can modify the function according to their requirement.

These are written by the programmer to perform a particular task, that is repeatedly used in main program. These function are helpful to break down a large program in to a number of smaller functions.

For better understanding user-defined functions can be categorized as:
i) Function with no arguments and no return value.
ii) Function with arguments and no return value.
iii) Function with arguments and with return value.
iv) Function with no arguments and with return value.

< Previous Next >

Privacy Policy Terms of Service About
Creative Commons License
This work is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License.