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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!