Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider the following program written in C syntax: void fun ( int first, int se

ID: 3616292 • Letter: C

Question

Consider the following program written in C syntax: void fun (int first,int second) {    first +=first;    second +=second; } void main() {    int list[2]={1,3};    fun(list[0], list[1]); } For each of the following parameter-passing methods, what arethe values of the list array after execution? a. Passed by value b. Passed by reference c. passed by value-result Consider the following program written in C syntax: void fun (int first,int second) {    first +=first;    second +=second; } void main() {    int list[2]={1,3};    fun(list[0], list[1]); } For each of the following parameter-passing methods, what arethe values of the list array after execution? a. Passed by value b. Passed by reference c. passed by value-result

Explanation / Answer

(b) {2,6} (c) {2,6}