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
ivann1987 [24]
4 years ago
5

Will give brainliest and good amount of points, no false answers.

Computers and Technology
1 answer:
nlexa [21]4 years ago
7 0

The problem with the swap function is that it loses the value at the first index, as soon as it gets overwritten by the value at the second index. This happens in the first statement. To fix it, you need a helper variable.

First you're going to "park" the index at the first index in that helper variable, then you can safely overwrite it with the value at the second index. Then finally you can write the parked value to the second index:

var swap = function(array, firstIndex, secondIndex) {

let helper = array[firstIndex];

array[firstIndex]  = array[secondIndex];

array[secondIndex] = helper;

};

I hope this makes sense to you.

You might be interested in
Draw a flowchart that ask the user to enter number: if the number is less than then 10 number it is doubled if the number is mor
solong [7]

Answer:

please find the attachment of the flowchart.

Explanation:

In this question, a start block is used to start the program, in the parallelogram box we input the value from the user end and in the diamond box, we check the input is not equal to 0. In the next diamond box, it checks the given input value and print value, and at the last, we stop the code.

Please find the program and its output in the attached file.

8 0
3 years ago
Where can page numbers appear in header , in footer, inside labels , at the top of columns or the bottom of colums
sveta [45]

Answer:in footer

Explanation:

It When you look at a book for example the page number is always in the bottom which the footer can allow you to add the page number

3 0
3 years ago
C++ programming true or false questions
Lostsunrise [7]

Answer:

a. True

b. False

Explanation:

Constructor is used to initialize the object of the class.

Rules of constructor:

1. Constructor name must same as the class name. it means, if the class name is animalType, then constructor name must be animalType.

2. Constructor does not have any return type. it means, it does not return anythings.

Therefore, part (a) is true,  Constructor name must same as the class name.

and part (b) is false, because constructor does not have any return type.

7 0
4 years ago
Which activity can be used to modify the value of an existing cell in a datatable
stepladder [879]

Answer:

The name of the activity is "Add Data Column".

Explanation:

Add data column activity is a part of the database that is used in used for adding a column in the database table. This activity also used in Windows.  

  • It provides attachment in windows activity by using Uipath studio.
  • The Uipath studio is used to connect with any application, that enables by windows, and to perform multiple operations on single user interface elements.
4 0
3 years ago
While trying to solve a network issue, a technician made multiple changes to the current router configuration file. The changes
rjkz [21]

While trying to solve a network issue, a technician made multiple changes to the current router configuration file. The changes did not solve the problem and were not saved. The technician can<u> Issue the reload command without saving the running configuration.</u>

Explanation:

  • The technician does not want to make any mistakes trying to remove all the changes that were done to the running configuration file.
  • The solution is to reboot the router without saving the running configuration. The copy startup-config running-configcommand does not overwrite the running configuration file with the configuration file stored in NVRAM, but rather it just has an additive effect.
  • Configuration change control is a set of processes and approval stages required to change a configuration item's attributes and to re-baseline them.
  • Configuration status accounting is the ability to record and report on the configuration baselines associated with each configuration item at any moment of time.
  • The Manage System Configuration screen allows you to download, save, switch, revert and delete system configuration files.
  • Configuration Control is the activity of managing the product and related documents, throughout the lifecycle of the product.

6 0
3 years ago
Other questions:
  • Determine the output of the following code segment:
    9·1 answer
  • (Game Design) A float is a blank space, used as a placeholder in an array<br><br> True or false
    13·1 answer
  • Why are duplicate tuples not allowed in a relation?
    6·1 answer
  • What is the best application to create a slide show presentation?
    13·2 answers
  • Anyone here good with python coding. I have some machine learning homework which I am having a hard time with,
    12·1 answer
  • Which of the following is a form of security protection that protects individual files by scrambling the contents in such a way
    14·1 answer
  • What patterns do you find within the fractions in the inch on the ruler?
    14·1 answer
  • HELP MY TABLET KEEPS ON REBOOTING I TRIED TO FACTORY RESET BUT IT KEEPS ON REBOOTING
    12·2 answers
  • Make a program that receives several integers (the program ends when a negative number is entered) and shows how many times the
    14·1 answer
  • given 2,4,3,-1 as input, what is the output for the following program:total_product = 1 user_value = int(input()) while user_val
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!