Functions are nothing but a piece of code which is meant to do some task out of the main program, which can be reusable. In C, we write functions to make program simple. Suppose we want to find the square of a number ten times in a program, instead of writing ten times the same code with different numbers, we can write a function which takes a number and gives the square and use the function every time we need the function.
Functions are basically of three types.
Functions are basically of three types.