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
A computer would do a better job than a human at solving lengthy, complex math problems. True False
Alborosie

Answer:

I would say true

Explanation:

Humans, by contrast, can master many things, from tying our shoes to cooking an omelet to solving complex math equations. The best AI hardly comes close to the incredible creativity and design of any human, and it’s an open question whether AI can ever become what its prophets claim. Second, when we make AI, we are basically copying our Creator.

8 0
3 years ago
Read 2 more answers
Why backup system of data and software is necessary. ​
zavuch27 [327]

Answer:

The purpose of the backup is to create a copy of data that can be recovered in the event of a primary data failure. Primary data failures can be the result of hardware or software failure, data corruption, or a human-caused event, such as a malicious attack (virus or malware), or accidental deletion of data.

7 0
3 years ago
Write a program that reads numbers from the user until a blank line is entered. Your
ddd [48]

Answer:

nums = []

while True:

   in = input()

   if in:

       nums.append(in)

   else:

       break

if nums:

   avg = sum(nums) / len(nums)

   for i in range(len(nums)):

       if nums[i] == avg:

           print(f"index: {i+1}")

           print(nums[i])

else:

   print(-1)  # if there aren't any values in nums

Explanation:

Assuming that you are coding in Python 3x. The last 'else' statement is an edge case that you might want to consider, I don't know what you want to put there, but I'm just going to leave it as -1.

5 0
3 years ago
Dibujar un circuito con dos condensadores de 8 y 5 nf (nanofaradios),
DENIUS [597]

Answer:

CT = 470nF + 1000nF = 1470nF or 1.47μF

Explanation:

When capacitors are connected together in parallel the total or equivalent capacitance, CT in the circuit is equal to the sum of all the individual capacitors added together. This is because the top plate of capacitor, C1 is connected to the top plate of C2 which is connected to the top plate of C3 and so on.  The same is also true of the capacitors bottom plates. Then it is the same as if the three sets of plates were touching each other and equal to one large single plate thereby increasing the effective plate area in m2.

Since capacitance, C is related to plate area ( C = ε(A/d) ) the capacitance value of the combination will also increase. Then the total capacitance value of the capacitors connected together in parallel is actually calculated by adding the plate area together. In other words, the total capacitance is equal to the sum of all the individual capacitance’s in parallel. You may have noticed that the total capacitance of parallel capacitors is found in the same way as the total resistance of series resistors.

The currents flowing through each capacitor and as we saw in the previous tutorial are related to the voltage.

8 0
3 years ago
Copyright Laws provide_______ for the owners of creative works.
viktelen [127]
They provide protection
7 0
3 years ago
Other questions:
  • Someone help me I don’t know what to do /COMPUTER SCIENCE
    5·1 answer
  • What career cluster does a fish and game warden fall in?
    14·1 answer
  • Jed is the database administrator for a mid-sized computer component manufacturer. He is responsible for validating the data mod
    12·1 answer
  • What is an compiler?
    15·2 answers
  • Think of an example in your life where a number could be described as data, information, and knowledge
    14·1 answer
  • One of the main responsibilities employers have under OSHA is to:
    9·2 answers
  • Which screen should be open to customize or personalize a desktop background
    11·1 answer
  • A ________ is a question you ask about data stored in a database
    9·1 answer
  • 1.6<br> What do you call the two parts of the lift that goes down a mine?
    10·1 answer
  • The condition known as __________ occurs when you try to store an integer that is bigger than the maximum allowed by the number
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!