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
You're setting up some VMs to test an application you're considering making available to employees of the small company you work
IgorLugansk [536]

Answer:

Snapshots in VirtualBox, Hyper-V, and please check explanation.

Explanation:

You should never test the software on your PC as you never know what virus or threat they bring with them. Even when you are a software company and testing your own new software, you should use the VM, as it is safe. Any adverse effect can be tackled as the VM is made to be destroyed some day.

You can install numerous OS on your VM. The two best are certainly Virtual Box and the Hyper-V from VMWare. Remember, if you dont want to use the licensed version of certain OS, the trial versions are always available for free, and you can install them on the VMs.

There is a snapshot option on the VirtuabBOX. You are only required to create the snapshot after creating and configuring the VM. It supports Windows, Linux and Mac. So you can install almost any OS. However, VMWare Player does not support the Snapshot, but it provides s similar option known as Checkpoints. However, VMware Workstation supports Snapshots, though they might be costly.

If you are on OS X you can make use of Parallels.

However, never enable file sharing, and stay away from Bridge mode as well as never use your original accounts. File sharing will inject the malware if any to all places on network. The bridge mode connects the VM directly to the network, which otherwise remain hidden behind NAT. And use of personal accounts can cost you them, and this can be quite a big loss definitely.  

6 0
3 years ago
Read 2 more answers
When you declare a variable of a basic, primitive type, such as int x = 10;, the memory address where x is located holds the ___
Nadya [2.5K]

Answer:

Answer is (d) value of 10

Explanation:

Usually when we write "int x=10;", a memory space is allocated for an integer variable with name x, and content 10.

8 0
3 years ago
Read 2 more answers
Does any one have 2 reasons it would be a good idea to have a glow in the dark TV.
snow_lady [41]
1. be able to see function keys and input and output ports on the back
2. never lose your tv in the dark
5 0
3 years ago
Malware is an all-encompassing term which includes _______
melomori [17]

Answer:

viruses

Explanation:

7 0
3 years ago
Read 2 more answers
You turn your computer on and the computer will not boot up where is something you should do to diagnose the problem?
Svetllana [295]
Is this an educational question
4 0
3 years ago
Other questions:
  • How do you tack pictures for this app
    15·1 answer
  • Standards for all managers ethical responsibilities are covered in a company's
    7·2 answers
  • Jim, the IT director, is able to complete IT management task very well but is usually two weeks late in submitting results compa
    5·1 answer
  • A(n) _____ is a type of server that stores computer software, which users can access from their workstations.
    6·1 answer
  • What is the output of the following C++ program?
    15·1 answer
  • Which of the following are characteristics of algorithms? Choose all that apply. They take a step-by-step approach to performing
    12·1 answer
  • Communication of a message between two processes implies which of the following? (A) Synchronization (B) Atomic operation (C) Bl
    11·1 answer
  • Extend to also calculate and output the number of 1 gallon cans needed to paint the wal. Hint: Use a math function to round up t
    12·1 answer
  • 3.6 Code Practice on Edhesive
    10·1 answer
  • What are the benefits of a relationship in RDBMS <br>​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!