1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
muminat
3 years ago
13

Given the following function definition

Computers and Technology
1 answer:
siniylev [52]3 years ago
3 0

Answer:

B. 1 6 3

Explanation:

Given function definition for calc:

void calc (int a, int& b)

{

int c;

c = a + 2;

a = a * 3;

b = c + a;

}

Function invocation:

x = 1;

y = 2;

z = 3;

calc(x, y);

cout << x << " " << y << " " << z << endl;

  • Since x is passed by value, its value remains 1.
  • y is passed by reference to the function calc(x,y);

Tracing the function execution:

c=3

a=3

b=c+a = 6;

But b actually corresponds to y. So y=6 after function call.

  • Since z is not involved in function call, its value remain 3.

So output: 1 6 3

You might be interested in
what is the command used to retrieve the java files along with the string existence "Hello world" in it​
Leona [35]

Answer:

java” xargs grep -i "Hello World”

8 0
3 years ago
Software that people commonly use in the workplace to make their lives easier is called?
emmasim [6.3K]
Answer: System Software

7 0
3 years ago
What is the output of the code? (CHECK IMAGE)
PIT_PIT [208]

Answer:

689

Explanation:

8 0
2 years ago
(Game Design) Creating and manipulating data structures is one of the primary functions of a development environment.
Galina-37 [17]

true i believe im not for sure

7 0
3 years ago
Read 2 more answers
When you compile your program, the compiler identifies the logic errors and suggests how to correct them?
Rainbow [258]
Nope. You're on your own to find them and fix them. This why testing is so important, otherwise they won't show up until the customer finds them and that's embarrasing.
6 0
3 years ago
Other questions:
  • The groups_per_user function receives a dictionary, which contains group names with the list of users. Users can belong to multi
    11·1 answer
  • If you define CSS rules on a parent control, the rules will be inherited by all of the children widgets.
    12·1 answer
  • Suppose you have two arrays of ints, arr1 and arr2, each containing ints that are sorted in ascending order. Write a static meth
    7·1 answer
  • When did mac start? when did windows start? when did lynux start?
    13·2 answers
  • PLZ HELP ME! What is a false statement about online time?
    9·1 answer
  • How can you tell that you're driving in the right direction?
    14·1 answer
  • What concept or principle requires layered, complementary controls sufficient to detect and deter infiltration and exploitation
    6·1 answer
  • Technician A says that high pressure in recycled refrigerant is only caused by air contamination. Technician B says that recycle
    15·1 answer
  • 300134223+304532264440=
    11·2 answers
  • Help me with the question please..​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!