Cpp Programming | Functions 5

Pass And Return

In Pass and Return, value(s) is/are passed from the calling function to the called function and a value is returned back from the called function to the calling function.

* Any number of arguments can be passed to a function
* Any data type of arguments can be passed to a function
* Number of arguments passed while calling a function should be same as number of arguments being received in the function definition.
* Data types of arguments passed while calling a function should be same as data types of arguments being received in the function definition.

Note:

* A function can return a maximum of one value.
* There can be any number of return statements in a function but as soon as any one of return the statement gets executed the control goes back to the calling function.