1. What is the main difference between passing parameters to a function by value and passing parameters to a function by address? Explain your answer with a proper example for each. 2. What ambiguity...



1.
What is the main difference between passing parameters to a function by value and passing parameters to a function by address? Explain your answer with a proper example for each.



2.
What ambiguity exists in the statement P = 9/4 – 1



3.
Suppose a small company has five employees and is planning to increase the number to six. Moreover, suppose one of the company’s programs contained the following assignment statements.


DailySalary = TotalSal/5;


AvgSalary = TotalSal/5;


DailySales = TotalSales/5;


AvgSales = TotalSales/5;


How would the task of updating the program be simplified if the program had originally


been written using constants named NumberOfEmp and WorkWeek (both set to the value 5) so that the assignment statements could be expressed as


DailySalary = TotalSal/DaysWk;


AvgSalary = TotalSal/NumEmpl;


DailySales = TotalSales/DaysWk;


AvgSales = TotalSales/NumEmpl;








Dec 18, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here