Function is a block of code or sub program used to divide the large programs into small parts.Mainly used for Debug Process.
Use of functions
- used to reduce the lines of code
- easy to debug
- Reuse ability
Syntax
return_type function_name([argument1],[argument2]...)
{
//statement or block of code;
}
function_name([argument1],[argument2]...);
return_type function_name([argument1],[argument2]...)
{
//statement or block of code;
}
function_name([argument1],[argument2]...);
Comments
Post a Comment