A program contains three functions named main, calcGross, and displayGross. Two of the functionsmain and calcGrossdeclare a
Question:
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
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: