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
The DNS server at your headquarters holds a standard primary zone for the abc domain. A branch office connected by a slow WAN li
mafiozo [28]

Answer:

In the SOA tab of the zone's Properties dialog box, increase the refresh interval.

Explanation:

5 0
2 years ago
This is for C++: Using a nested for loop output the following pattern to the screen:
olga55 [171]

Answer:

Following are the code to the given question:

#include <iostream>//header file

using namespace std;

int main()//main method

{

int r=26,x,y;//defining integer variable  

char c;//defining a character variable

for(x= 1; y<= r; x++)//using for loop for count value

{

for(y= 1; y<= x; y++)//using for loop to convert value in triangle  

{

c=(char)(y+64);//convert value into character  

cout << c;//print character value

}

cout << "\n";//use print method for line break

}

return 0;

}

Output:

Please find the attachment file.

Explanation:

In this code, three integer variable "x,y, and r", and one character variable "c" is declared, that is used in the nested for loop,  in the first for loop it counts the character value and in the next for loop, it converts the value into a triangle and uses the char variable to print its character value.

3 0
2 years ago
Implementing multiple types of technology and thereby precluding that the failure of one system will compromise the security of
Setler79 [48]

Answer:

Redundancy

Explanation:

  • There are several redundant computer systems that can be applied to various operating systems and platforms.
  •  In any case, a server usually has redundant components, disks, network cards and power supplies.
  • The servers usually have two network cards with data redundancy, so in case of failure we will always have one of them available.
  • In conclusion, data redundancy is a fundamental system for the correct storage of the data available in the database.
5 0
2 years ago
Plzzzzz help me with this and be serious dont comment random things
RoseWind [281]

Answer:

legal and ethical questions

brick and mortar guidelines

website content

customer information

the facts of life

payment processing

human resources

this is in career explorations 2 please help will mark the brainiest ​

Explanation: yes he is right this is correct

7 0
2 years ago
Question 13 (1 point)
Mrac [35]
The second option “1 inch”

Is correct for default word documents
8 0
3 years ago
Other questions:
  • Wireless network devices use ________ to communicate with each other.
    9·2 answers
  • In a paragraph of no less than 125 words, describe how technology helps business professionals to be more efficient. Include exa
    12·2 answers
  • Can somebody help me?
    11·1 answer
  • You can use RWA to demonstrate how to do something special on the web, such as displaying articles found on websites that suppor
    15·1 answer
  • Face book requires you to change your password regularly<br> a. TRUE<br> b. FALSE
    14·1 answer
  • Write the include directive that allows use of the function headers in the file myFuncs.h.
    13·1 answer
  • Where can you place CSS statements in an HTML file?
    7·1 answer
  • Amazon SWF is restricts you to use a specific programming language when setting up a work flow
    8·1 answer
  • 4. An abstract data type is defined as _____.
    14·1 answer
  • Think about some of the most memorable and forgettable games ever created. They can be games that were
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!