Академический Документы
Профессиональный Документы
Культура Документы
COURSE : PROGRAMMING II
COURSE CODE : CSC404
EXAMINATION : MAY 2020
TIME : 1 HOUR 15 MINUTES
INSTRUCTIONS TO CANDIDATES
DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO DO SO
This examination paper consists of 1 printed page
QUESTION 1
a) Write a function named addTwo() that will receive three pointers of floats. It will add the
numbers pointed to by the first two floats and store the summation in the location pointed
to by the third pointer. Display the summation value.
(3 marks)
i) Write a function named formula() to compute the numbers and return the
summation to the main() function.
ii) In main() function, prompt the user to input n value and display the result of the
summation.
(7 marks)
QUESTION 2
Sarah is working at Burgertory, a homegrown burger bar. She can prepare 12 burgers
within 2 minutes. The administration department wants to make a survey on how long it
takes Sarah to prepare 600 burgers. Write a complete C++ program that assist the
administration to prepare the following report:
[Hint: Declare one-dimensional array to store number of burger, hour and minute each.]
(10 marks)