Question: What is the problem with the following code snippet? double discount(double& cost) { return (0.9 * cost); } int main () { cout < <
What is the problem with the following code snippet?
double discount(double& cost)
{ return (0.9 * cost);
}
int main ()
{ cout << discount(49.95);
}
a.
The data type returned by the function discount does not match the return type.
b.
The argument to the function discount must be a variable.
c.
The function discount must return void.
d.
The code is correct.
Clear my choice
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
