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, 22.06.2019 04:30
Eye injuries usually occur as a result of all of the following things, except: a) proper machine operation b) battery explosion c) falling or flying debris d) electric welding arc
Answers: 2
question
Computers and Technology, 22.06.2019 07:00
Idon understand these and need some ! ?
Answers: 2
question
Computers and Technology, 22.06.2019 13:00
Which option should u select to ignore all tracked changes in a document
Answers: 1
question
Computers and Technology, 22.06.2019 16:00
Why should characters such as / \ " ' * ; - ? [ ] ( ) ~ ! $ { } < > # @ & | space, tab, and newline be avoided in file names?
Answers: 2
You know the right answer?
Consider the following program written in c syntax:

void swap (int a, int b) {
Questions
question
Mathematics, 30.06.2019 21:30
question
English, 30.06.2019 21:30
question
Mathematics, 30.06.2019 21:30
Questions on the website: 13722360