subject

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]);

for each of the following parameter-passing methods, what areall of the values of the variables value and list after each of thethree calls to swap?

a. passed by value

b. passed by reference

c. passed by value-result

2. 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 areall of the values of the list array after execution?

a. passed by value

b. passed by reference

c. passed by value-result
me.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:10
Are special combinations of keys that tell a computer to perform a command. keypads multi-keys combinations shortcuts
Answers: 1
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
question
Computers and Technology, 23.06.2019 22:50
An environmental protection agency study of 12 automobiles revealed a correlation of 0.47 between engine size and emissions. at 0.01 significance level, can we conclude that there is a positive association between the variables? what is the p value? interpret.
Answers: 2
question
Computers and Technology, 24.06.2019 02:10
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
You know the right answer?
Consider the following program written in c syntax:

void swap (int a, int b) {
Questions
question
Business, 02.12.2020 01:00
question
Mathematics, 02.12.2020 01:00
question
Computers and Technology, 02.12.2020 01:00
question
Chemistry, 02.12.2020 01:00
question
Chemistry, 02.12.2020 01:00
question
History, 02.12.2020 01:00
Questions on the website: 13722361