Question: The problem should be solved in C++ programming language Question 4 A. New programmers often have a problem determining when an argument should be passed

The problem should be solved in C++ programming language
Question 4 A. New programmers often have a problem determining when an argument should be passed to a function by reference and when it should be passed by value. The problem is further compounded by the fact that if a value must be "sent back to the calling function there are two ways to do it: by using a reference parameter or by using a return statement. Provide some general guidelines. [5 marks] B. A weather analysis program uses the following array to store the temperature for each hour of the day on each day of a week. int temp[7][24]; Each row represents a day (0 = Sunday, 1 = Monday, etc.) and each column represents a time (0 = midnight, 1 =1 a.m., ... , 12 = noon, 13 = 1 p.m., etc.). i) Write code to find Tuesday's average temperature. [4 marks] COSC121 [2ND @2020/2021] SANDWICH II Page 6 ii) Write code to find the average weekly noon temperature. [4 marks] C. The date June 10, 1960, is special because when we write it in the following format, the month times the day equals the year. 6/10/60 Write a program that asks the user to enter a month (in numeric form), a day, and a two- digit year. The program should then determine whether the month times the day is equal to the year. If so, it should display a message saying the date is magic. Otherwise, it should display a message saying the date is not magic. [7 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
