Computers and Technology

Given the following function definition
void calc (int a, int& b)
{
int c;
c = a + 2;
a = a * 3;
b = c + a;
}
what is the output of the following code fragment that invokes calc?
(all variables are of type int)
x = 1;
y = 2;
z = 3;
calc(x, y);
cout < < x < < " " < < y < < " " < < z < < endl;
a.
1 2 3
b.
1 6 3
c.
3 6 3
d.
1 14 9

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 00:50, sequoyaburke
Which player type acts on other players? a. killer b. achiever c. explorer d. socializer
Answers: 1
image
Computers and Technology, 24.06.2019 03:00, 2020IRodriguez385
With editing, word automatically displays a paste options button near the pasted or moved text. a. cut-and-paste b. drag-and-drop c. inline d. copy-and-carry
Answers: 1
image
Computers and Technology, 24.06.2019 08:30, colebuug9
Aconsumer would pay an extra they used the rent to own program to buy the computer, rather than using cash. for all of the items, is the cheapest option over the life of the contract. the most expensive overall option is to use purchase the item.
Answers: 2
image
Computers and Technology, 24.06.2019 17:40, lia1690
Which of the following processes applications across multiple computing devices? a. functional application b. distributed system c. workgroup information silo d. information silo
Answers: 3