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
Micro sleep is when you ____.
Levart [38]

Microsleep refers to periods of sleep that last from a few to several seconds.

8 0
3 years ago
Read 2 more answers
Is the cell phone changing our views about polite and impolite behavior? For example,
DochEvi [55]

*This question seems like an opinion based question, but here is my opinion on the matter:

Yes the cell phone is changing our views of what is polite and impolite. It is indeed impolite to talk on your phone while you are ordering a drink at Starbucks, because then you aren't focusing on ordering instead you are focused on your phone call which can interfere with your ordering.

Hope this helps!

8 0
3 years ago
Read 2 more answers
An application is to be written that would allow students to find out their GPA(double) and their total number of credits (an in
Mama L [17]

Answer:

the key is = rand(the numbers of an integer)

7 0
3 years ago
Before a program written in c can be executed on a computer, what step is required to be done first?
sergejj [24]
It should be compiled. It won't work if it's not compiled.
6 0
3 years ago
. the web is based on the ________ protocol
elena55 [62]
The standard (and default) port for HTTP<span> servers to listen on is 80, though they can use any port. </span>HTTP<span> is based on the </span>TCP/IP protocols<span>, and is used commonly on the Internet for transmitting web-pages from servers to browsers.</span>
3 0
3 years ago
Other questions:
  • Write a function called ReverseLetters that takes an input phrase consisting of a single word and reverses the sequence of lette
    15·1 answer
  • What precaution can you take while using a social networking site to prevent a data breach?
    15·1 answer
  • Which of the following characters at the beginning of a cell signifies to Excel that it should perform a calculation for the val
    13·1 answer
  • The ___ is the primary storage device of a personal computer. hard drive RAM ROM compact disc
    6·1 answer
  • Which of the following commands is more recommended while creating a bot?
    9·1 answer
  • PLZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    11·2 answers
  • Which of the following takes place during the research phase
    7·1 answer
  • Develop a C++ program that will determine whether a department store customer has exceeded the credit limit on a charge account.
    13·1 answer
  • What is the scope of numC?
    8·2 answers
  • The Internet is based on a U.S. government project called ________. Today, the Internet is a collection of networks, tied togeth
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!