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

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

1 Expert Approved Answer
Step: 1 Unlock

Answer Answer 5a Argument a is passed by value Answer 5b Argu... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!