1) Examine the following function header, the write an example call to the function.
void showValue(int quantity)
2) The following statement calls a function named half. The half function returns a value that is half that of the arguement. Write the function.
result = half(number);
3) A program contains the following function.
int cube(int num)
{
return num * num * num;
}
Write a statement that passes the value 4 to this funtion and assigns its return value to the variable result.
4) write a function named timeTen that accepts an arguemtn. When the function is called, it should display the product of its argument multiplied times 10.
5) A program contains the following function.
void display(int arg1, double arg2, char arg3)
{
cout << "Here are the values: "
<< arg1 << " " ,, arg2 << " "
<< arg3 << endl;
}
Write a statemetnt that calls the procedure and passes the following cariables to it:
int age;
double income;
char initials;
6) Write a function named getNumber that uses a reference parameter variable to accept an integer argument. The function should prompt the user to enter a number in the range of 1 through 100.. The input should be validated and stored in the parameter varialbe.