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
What allows customers to use the Web to find answers to their questions or solutions to their problems?
scoundrel [369]

Answer:

b..........please Don't hate if wrong

3 0
3 years ago
Read 2 more answers
When considering changing the content of a cell which button should you press to leave the cell as it originally was
Mashcka [7]

When considering changing the content of a cell you should press CTRL + Z to leave the cell as it originally was.

 

To undo an action just:

 

Press Ctrl+Z until you've fixed your mistake.

Or press Alt+Backspace to do the same thing.

If you prefer your mouse, click Undo on the Quick Access Toolbar.

5 0
3 years ago
Read 2 more answers
Which of the following is true about strings?
pickupchik [31]

Answer:

Your answer is option C, or the third option.

They do not let the user type in letters, numbers, and words.

Explanation:

Strings are defined as a sequence of characters literal, constant, or variable. These sequences are like an array of data or list of code that represents a structure. Formally in a language, this includes a finite(limited) set of symbols derived from an alphabet. These characters are generallu given a maximum of one byte of data each character. In longer languages like japanese, chinese, or korean, they exceed the 256 character limit of an 8 bit byte per character encoding because of the complexity of the logogram(character representing a morpheme((which is the simpliest morphological(form or structure) unit of language with meaning)) character with 8 bit (1 byte, these are units of data) refers to cpu(central processing unit) which is the main part of a computer that processes instructions, and sends signals.

5 0
3 years ago
During side show mode, hitting the B key will do which one of these?
slavikrds [6]

Answer:

B) Blank the screen with black screen

Explanation:

<em>The answer is letter B. During the slideshow, if you press B in your keyboard, it will display a black screen. When you press W, it will display white screen while when you press B again, you will be directed to a last display slide on the presentation. </em>

6 0
3 years ago
An objective test or measurement that technology product evaluators use to compare two or more products is ____.
Crazy boy [7]
<span>An objective test or measurement that technology product evaluators use to compare two or more products is benchmark. The benchmark is set of standards which are used to compare two products. Several parameters are measured in order to compare the products and to define the weak points where improvements can be done. The obtained information form the test is used to improve performance. </span>
4 0
3 years ago
Other questions:
  • What are the best apps to learn coding
    15·2 answers
  • Naseer has inserted an image into his document but needs the image to appear on its own line.
    14·2 answers
  • 3k means about 3 thousand bytes. how would you express two hundred million bytes? .
    8·1 answer
  • Is there any level after genius?
    8·1 answer
  • Why might the government censor what its citizens see on the internet?
    13·2 answers
  • Problem 4 (25 points)Consider a byte addressing architecture with 64-bit memory addresses.(a)Which bits of the address would be
    5·1 answer
  • Explain why the computer is powerful working tool???​
    7·1 answer
  • A boundary marks the inside and outside of a system and sets the system apart from its environment.
    11·1 answer
  • PYTHON CODING QUESTION
    10·1 answer
  • Differentiate between off the shelf software and bespoke software
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!