Question
QUESTION 3 Given the following program segment. #include void calculate (float, float &, float &); int main() { float a=10, b=0, c=0; calculate (a, b,
QUESTION 3 Given the following program segment. #include
6 | Page CSC415: Fundamentals of Computer Problem Solving
6
} void calculate (float x, float &y, float &z) { y = 0.2 * x; z = 0.3 * x; } a) List three (3) local variables in the main() function. b) Identify the data type of parameter received by function calculate(). c) Identify the type of passing of parameter x (hint: by value or reference). d) Identify the type of passing of parameter z (hint: by value or reference). e) Show the output of the above program.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started