<

Different type of function

There are two kind of function:

1. User defined function

2. Library function

User defined function:

User defined function is small or sub function created by programmer.

Library function:

Library function is some reserved function in c compiler such as printf();scanf(); etc. If you write printf(); the reserved commands for printf() function inside stdio.h file will be executed.
Look at this program

#include<stdio.h>
void function1(void)
{
    printf("function1 is called to main function n");
}
int main()
{
   function1();   //function is calling
   return 0;
}

Analysis: In the program ‘function1’ is a user defined function and ‘printf()’ is a library function.