A function is a block of statements which are created to perform a specific task.
Basically functions are of two types:
1.Library /predefined function
2.User defined function
Library /predefined function :
These are the in built ,or say,predefined function provided by programming language.
printf(), scanf(), getch() etc
User defined function:
User defined functions are those which are created for the users for their own use. When ever a function is called in a program, control of the program jumps from main to that function body.
>>The main function is a user implemented function whose prototype(or say signature) is pre-defined by compilers.It tells compiler where to start to give a valid executable code to run.