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
Mnenie [13.5K]
3 years ago
6

Given the function definition void something ( 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 something? (All variables are of type int.) r = 1; s = 2; t = 3; something(t, s); cout << r << ' ' << s << ' ' << t << endl;
Computers and Technology
1 answer:
timurjin [86]3 years ago
8 0

Answer:

1 14 3

Explanation:

If that code fragment is put under a main() function and then it will yield the above output. According to the function something(), only changes in value second parameter will be reflected and first will be unchanged because second is passed by reference and the first one is passed as value so only address of 's' is passed, so, only its value is changed and the rest are same.

You might be interested in
What can help prevent issues related to downloading content from the internet
Natasha_Volkova [10]
The best step to take is to have some kind of anti-malware/spyware software. Hope this helps you!


-Belle
8 0
3 years ago
Can you choose what part of the image is in focus with a point-and-shoot camera?
Evgen [1.6K]

I believe you can blur the background of the image you are taking of.

6 0
3 years ago
Arrays are described as immutable because they are two dimensional. are arranged sequentially. can be reordered. cannot be chang
fredd [130]

Answer:

Arrays are described as immutable because they cannot be changed once they are defined.  (D on Edge)

Explanation:

It's in the notes and I just took the test (2020)

5 0
4 years ago
And, Or, Not are examples of:
yanalaym [24]
Boolean operators it is
all the best
5 0
3 years ago
I am a bunch of large LANS spread out over several physical locations. Who am I?
Ivan

Answer:

You're WAN

Explanation:

Wide Area Network

8 0
3 years ago
Other questions:
  • A(n) combines video instruction and interaction with an instructor and students in an online classroom.
    9·1 answer
  • The operations planning practice of inputting sales forecasts into computer software that accurately predicts the amount and tim
    6·1 answer
  • How precisely can you rotate a graphic in a document?
    14·1 answer
  • 1. What does it mean to say that a country’s land area is positively correlated with its population?
    12·2 answers
  • Read this excerpt from The Outsiders. Or I could have gotten one of the gang to come along, one of the four boys Darry and Soda
    10·2 answers
  • Now tell me how be rich like Bill Gates
    6·1 answer
  • Which tag defines the visible content of a web document?
    10·1 answer
  • What is the function of HTML?
    13·2 answers
  • A group of students writes their names and unique student ID numbers on sheets of paper. The sheets are then randomly placed in
    15·1 answer
  • Questione
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!