More large and complex softwares are divided into parts which contains different instructions.and different types of function makes a whole c program.function are used to avoid writing code again and again in c program.its advantage is that, that it can be used as many times as we want.if we use functions we can understand the program easily and we can remove bugs easily. we can call functions by two types as follows:
1.call by value
2.call by refrence
Function definition: return_type function_name(arguments);
{function Body};
Function call: function_name(arguments);
function declaration: return_type function_name(arguments);
1.Call by value
In this type values of the variables are passed through the specific function.
EXAMPLE:
2.Call by Refrence
In this type the addresses of the variables are passed through the specific program.
Example:
1.call by value
2.call by refrence
Function definition: return_type function_name(arguments);
{function Body};
Function call: function_name(arguments);
function declaration: return_type function_name(arguments);
1.Call by value
In this type values of the variables are passed through the specific function.
EXAMPLE:
2.Call by Refrence
In this type the addresses of the variables are passed through the specific program.
Example: