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
IgorC [24]
3 years ago
7

Don wishes to swap the values of the variables x and y in his program. He adds a line of code which sets the value of x to the v

alue of y and then a line of code which sets the value of y to the value of x. What is the effect of Don’s code?a. The values of both x and y will be set to the average of the original values of x and y.b. The values of both x and y will be set to the original value of x.c. The values of both x and y will be set to the original value of y.d. The values of the variables x and y will be swapped as intended.
Computers and Technology
1 answer:
12345 [234]3 years ago
5 0

Answer:

The correct answer is (c): The value of both x and y will be set to the original value of y.

Explanation:

Let suppose, we assign some value to variable x and to variable y i.e.

var x=10

vary y=15

Then Don adds a line of code which set the value of x to value of y i.e.

x=y

here it is mean that value of x become 15.

So after this line the value of x is 15 and y is also 15

Then he also added a line of code which set the value of y to value of x. i.e.

y=x

By adding this line of code, the value of y is 15 because x is equal to 15.

Therefore, the value of both x and y will be set to the original value of y.

Why other option are not correct

a. After swapping the value of both variable it is impossible that both variable retain original value in it.

b. this option is only true if in this first line he set the value of y to value of x and in the second line set the value of x to value of y.

d. When you swap two values, there is need of third variable for swapping, when you will swap the value only between two variable, only one variable value will be retained and intended swapping will not be performed

You might be interested in
Drag the tiles to the correct boxes to complete the pairs. Match the conversion systems with their steps. To convert a decimal f
bixtya [17]

Answer:

1

Explanation:

8 0
3 years ago
Targeted attacks are easier and take less time and effort than attacks on targets of opportunity.
Mnenie [13.5K]

Answer:

False

Explanation:

Targeted attacks are usually harder because if someone has a password that is 1234 and you try it on 100 computers, you most likely will get someones password. If you are targetting a select computer with a strong password it is much harder to brute force or guess.

8 0
3 years ago
Which soft skill involves the ability to produce ideas that will give an organization an advantage with respect to other organiz
KiRa [710]

B.  Strategic thinking

<u>Explanation:</u>

Strategic thinking helps to come up with great ideas that makes the company  better than the other company. One can apply strategic thinking to arrive at decisions that can be related to your work or personal life. Strategic thinking involves developing an entire set of critical skills. Strategic thinking enables a business owner to determine how to use these resources most effectively and advance the company toward its objectives. Strategic thinking focuses the management team on markets that are most likely to succeed.

5 0
3 years ago
Why hasn’t the World Health Organization declared a global health emergency?
Arada [10]
They WHO did declare global health emergency at the end of January
4 0
3 years ago
If you install the same default tracking code on pages with different domains, Analytics will count these users and sessions sep
elixir [45]
I guess you need to know if it is true or false. Then this one is true, Google Analytics will count the users and sessions with different domains separately. It's important to include tracking code on every page you want to track. This is the sequence to find your tracking code: Admin => Tracking Info => Tracking code.
6 0
2 years ago
Other questions:
  • Which of the following will track every single connection outside the Web by IP address and URL? Clipper Chip National Security
    13·2 answers
  • This procedure protects against the loss of data
    5·1 answer
  • A user found that their personal data had been exfiltrated from their computer by a malicious program that they clicked on sever
    12·1 answer
  • Cuando hablamos de entornos digitales de enseñanza aprendizaje a que nos estamos refiriendo
    10·1 answer
  • A device that protects electronic equipment from an increase in power, but not a decrease or outage is a ___.
    12·1 answer
  • Define<br>output<br>devices<br>.<br>Give<br>any<br>three<br>examples<br>.<br>3.​
    8·2 answers
  • When you are saving a file, what does word suggest by default as the name of the document?
    8·2 answers
  • 460N of force is exerted on an object with a surface area of 2,5m.How much pressure is felt by the object?​
    11·2 answers
  • Which generation computer supported GUI operating system?​
    11·1 answer
  • SmartArt is a Microsoft Office tool for creating what?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!