What is Function in C++
Function is a block of statements that perform individual tasks which means only runs when it is called when you can pass the data, known as parameters, into a function..
Types of Functions
There are two types of functions that is
1) Return Type:- A return_type is the data type name that function returns .
2) Function Name:- function name is by user define name, function name & parameter list together form the function.
3) Parameters:- User pass the value in the parameter. Parameters are optional that is a function may contain no parameters.
4) Function Body:- Function is a collection of statement.
The result is 8