Problem

A program contains three functions named main, calcGross, and displayGross. Two of the f...

A program contains three functions named main, calcGross, and displayGross. Two of the functions—main and calcGross—declare a variable named pay. The pay variable name also appears in the displayGross function header. When the computer processes the statement pay = hours * rate; in the calcGross function, it multiplies the contents of the hours variable by the contents of the rate variable. It then stores the result in which function’s pay variable?

a. calcGross

b. displayGross

c. main

d. none of the above because you can’t have more than one memory location with the same name

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search