What is the output of the following function and function call?
Void calculateCostint count, float& subTotal, float& taxCost) ;
Float tax = 0.0,
SubTotal = 0.0;
CalculateCost15, subTotal,tax) ;
Cout << "The cost for 15 items is " << subtotal
<< ", and the tax for " << subTotal << " is " << tax << endl;
//end of fragment
Void calculateCostint count, float& subTotal, float& taxCost)
{
If count < 10)
{
SubTotal = count * 0.50;
}
Else
{
SubTotal = count * 0.20;
}
TaxCost = 0.1 * subTotal;
}
A) The cost for 15 items is 3.00, and the tax for 3.00 is 0.30;
B) The cost for 15 items is 0.00, and the tax for 3.00 is 0.00;
C) The cost for 15 items is 0.00, and the tax for 3.00 is 0.30;
D) The cost for 15 items is 3.00, and the tax for 3.00 is 0.00;
Correct Answer:
Verified
Q17: What type of value does a void
Q18: The values or variables listed in the
Q19: A _ is a main program that
Q20: The variables passed a function are called
Q21: Which of the following function prototypes are
Q23: The preconditions) for a function describe:
A) What
Q24: Testing a program with values that are
Q25: Call-by-reference parameters are passed
A) nothing
B) the actual
Q26: pre and post conditions for a function
Q27: If you were to write a function
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents