Question: Write a complete cpp program that has two functions - (a) sum that takes three int parameters, the first two being value and the third
Write a complete cpp program that has two functions -
(a) sum that takes three int parameters, the first two being value and the third being reference.
The function sum will add up the values of the first two parameters and return their sum in the third parameter.
(b) sum2 that takes three int parameters, the first two being value and the third being a pointer to an integer. The function sum2 will add up the values of the first two parameters and return their sum in the third parameter.
write the prototype above main
Invoke the two functions in main
Write the function bodies after main.
(The two functions are of type void).
c++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
