Question: A void function named getInventory is passed four int variables named beginInv, sales, purchases, and endInv. The functions task is to calculate the ending inventory,

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)

Step by Step Solution

3.42 Rating (174 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a void g... View full answer

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 Microsoft Visual C# Introduction Questions!