For C++ 1.Provide an example of a simple function and discuss what it does. Solution Functions are one of the important ways to decompose software into smaller,manageable parts.Functions can have return values (for example,a function that computed might return that value) or they can return nothing. If they return nothing, the return type is stated as void and the function is sometimes called a procedure. Example : void f() { /////// } float g(intx,int y) { float sum=x+y; float avg=sum/2.0; return avg; } int main() { f(); float z=g(2,3); } In the above example function f() takes no parameters and returns nothing(taht is,its return type is void), and function g() takes two parameters of type int and returns a value of type float. .