An Introduction to Programming with C++: Eighth Edition
Chapter 10 Answers
Review Questions
1. c A void function cannot receive any items of information when it is called.
2. d displayTotal(total);
3. a void getEndBal(int, int);
4. a void getInventory(int b, int s, int p, int &e)
5. c getInventory(beginInv, sales, purchases, endInv);
6. c function header, function prototype
Exercises – Pencil and Paper
1. The answer to this TRY THIS Exercise is located at the end of Chapter 10 in the book.
2. The answer to this TRY THIS Exercise is located at the end of Chapter 10 in the book.
3. void getProduct(int num1, int num2, double dblNum, double &answer)
{
getProduct(firstNum, secondNum, thirdNum, product);
4. void calcQuotient(double n1, double n2, double &answer)
{
answer = n1 / n2;
} //end of calcQuotient function
void calcQuotient(double, double, double &); [or void calcQuotient(double
n1, double n2, double &answer);