95.3k views
0 votes
Consider the following program written in C syntax:

void swap(int a, int b) {
int temp;
temp = a;
a = b;
b = temp;
}
void main() {
int value = 2, list[5] = {1, 3, 5, 7, 9};
swap(value, list[0]);
swap(list[0], list[1]);
swap(value, list[value]);
}
. Passed by value-result

1 Answer

5 votes

Answer:

5=swap 0

Step-by-step explanation:

becouse it is invalid

User Wok
by
3.3k points