Question: Problem 5. [20 pts] Given the following function and main program int operation (int a[], int & b, int c) { int r; r
Problem 5. [20 pts] Given the following function and main program int operation (int a[], int & b, int c) { int r; r = *a = b; - b = (a + 1) - 2; c = b = 2; return (r); Answer: Answer: int main () { 5.a [4 pts] Is the argument a passed by value or reference? } int i [2], j = 2, k = 3; cin >> i[0]; 5.b [4 pts] Is the argument b passed by value or reference? Answer: i [1] (*1) ++; = cout < < operation (i, j, k) + j - k; return 0; 5.c [4 pts] Is the argument c passed by value or reference? Answer: Answer: 5.d [4 pts] What standard input is needed to get the output to be 0? 5.e [4 pts] What is the standard output when the input is 5?
Step by Step Solution
3.45 Rating (158 Votes )
There are 3 Steps involved in it
Answer Answer 5a Argument a is passed by value Answer 5b Argu... View full answer
Get step-by-step solutions from verified subject matter experts
