A void function named getInventory is passed four int variables named beginInv, sales, purchases, and endInv. The
Question:
A void function named getInventory is passed four int variables named beginInv, sales, purchases, and endInv. The function’s task is to calculate the ending inventory, using the beginning inventory, sales, and purchase amounts passed to the function. The function should store the result in the endInv variable. Which of the following function headers is correct?
a. void getInventory(int b, int s, int p, int &e)
b. void getInventory(int b, int s, int p, int e)
c. void getInventory(int &b, int &s, int &p, int e)
d. void getInventory(&int b, &int s, &int p, &int e)
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Question Posted: