A programmer creates a function according to the requirement of a program, which is called a user-defined function. A function whose prototypes are already defined in the C library is called the library function. 2. A user-defined function is required to write the complete code before using the function in a program.