Contact Us || Privacy Policy || About Us |
|
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 FunctionsThere are two types of functions that is
Explain that1) 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. Output: The result is 8 |