The following code appears in a sort function. Will this function sort in increasing order (smallest first) or decreasing order (largest first)? Explain your answer if (list[index] < list[index + 1]) { temp = list [index]; list[ index] = list [index +1]; list[index +1] = temp; }

Answers

Answer 1

A sort function sorts in an ascending or desceding order

The true statement is that the function would sort in decreasing order.

What is a sort function?

A sort function is a code segment that is used to reorder a list in ascending or descending order, when called or evoked

The order of the sort function

The code segment is given as:

if (list[index] < list[index + 1]) {

temp = list [index];

list[ index] = list [index +1];

list[index +1] = temp;

}

In the above code, we can see that the code compares a list element with the next element on the list, and the larger value comes to the front

This means that the sort function sorts in decreasing order

Read more about code segments at:

https://brainly.com/question/16397886


Related Questions

How many categories of computer do we have?

Answers

Answer:

The 10 types of computers include personal computers, desktops, laptops, tablets, hand-held computers, servers, workstations, mainframes, wearable computers and supercomputers.

Text based game project 1

Answers

Answer:

What is your question?

Explanation:

what is the future of web development

Answers

Answer:

Creating websites that can execute automated tasks and new programing languages revolving around web development.

Explanation:

Ncomputing and thin client
what it is
why is done , how it works and how it's
done ​

Answers

The term NComputing  is known to be a form of desktop virtualization company that is said to creates hardware and software to form virtual desktops.

The term Thin clients is known to be virtual desktops. They help a lot of users at the same time to share a single operating system instance.

What is the aim of a thin client?

In Ncomputer networking, a thin client is known to be a kind of low-performance computer that is known to be optimized and used for setting up a remote connection.

It is often used with a server-based computing system. The server here is one that often does most of the work, such as launching software programs, etc.

Learn more about Ncomputing from

https://brainly.com/question/12629145

17) If you want to find the average salary (with each employee's salary found in column C) for those who are full time employees (which will have "FT" in column B), you would use the ________ function.

A. COUNTAVERAGE


B. IFAVERAGE


C. AVERAGE


D. AVERAGEIF

Answers

Answer:

AVERAGE

Explanation:

THIS is a function used in Microsoft Excel.

The steps to find average is

Sum/Total

Hence

first we use AUtoSUM function to find sum then we use average to calculate

Answer:

Average

Explanation:

If you want to find the average salary (with each employee's salary found in column C) for those who are full time employees (which will have "FT" in column B), you would use the AVERAGE function.

what seemingly useless item can be of social, ecological or commercial value?

Answers

Earrings. They do nothing practical, but they provide social value by making you look more attractive.

Some seemingly useless item can be of social, ecological or commercial value is money, behavior, death etc.

What is something really useless?

A useless item are known to be things that are said to be rubbish.

They are items that is useless, of no value. Some  useless item can be of social, ecological or commercial value is money, behavior, vehicles etc.

Learn more about commercial value from

https://brainly.com/question/25528419

Which of the following are vector graphic file formats? Choose all that apply.

AI

PNG

RAW

SVG
Please help

Answers

There are different kinds of files. The option that is a vector graphic file formats is SVG.

What are vector files?

Vector files are known to be a type of images that are created by using mathematical formulas that stands as points on a grid.

The SVG  is known as Scalable Vector Graphics file and it is known to be a  vector image file format as it make use of geometric forms such as points, lines, etc.

Learn more about vector graphic file from

https://brainly.com/question/26960102

Answer:

AI and SVG

Explanation:

learned it from a comment i give all credit to them

Difference between centralized and decentralized processing in computer

Answers

Answer:

Centralized computing is analogous to star topology in the networks where there is n entry and n-1 exit points. We see all the computation being carried out by the pivot processor and also embed in itself a decision routine for pass on the message to other linked systems. These systems are merely the mirror whereas the computing is done by the pivot processor.

Decentralized Computing is analogous to distributed node based processing where the topology for interaction among the nodes are random and hence some times there is delay because of the orientation of nodes by since the computation is disperse, it compensates in the time in processing, storage and retrieval.

You can definitely check into IBM and Amazon Research for examples for the Centralized and Decentralized computing.

What command allows the root user to create a crontab file for the user jdoe?

Answers

The command allows the root user to create a crontab file for the user jdoe is As root, execute crontab -e jdoe.

What is the command in crontab?

The crontab command is known to be that often submits, make some editing, lists, or delete cron jobs.

Note that A cron job is a type of command that is often aided or  run by the cron daemon at  a consistent and scheduled times.

Conclusively, The  As root, execute crontab -e jdoe command will give room for the root user to create a crontab file for the user named jdoe.

Learn more about command form

https://brainly.com/question/25243683

Explain the main concept of Artificial Neural networks (ANN) as a set of layers that starts with an input layer that has sensors and the output layer that gives the predicted result (predictions) with hidden layers in between based on the ANN architecture and its specific type of application Knowledge One Individual Practical Assignment

Answers

Artificial Neural networks is a computational tool that is made up of a let of processing elements that takes in inputs and deliver outputs using a predefined activation codes.

What are the layers in an artificial neural network?

There are 3 Artificial olfactory sense and recognition system that are found in ANN.  It is made up of:

An input layer.An Hidden layer.An Output layer.

Note that these layers above help to tell more about the Artificial Neural networks (ANN).

Learn more about  Artificial Neural networks (ANN) from

https://brainly.com/question/25653113

What is information computer security

Answers

Answer:

Computer security, cybersecurity, or information technology security is the protection of computer systems and networks from information disclosure, theft of or damage to their hardware, software, or electronic data, as well as from the disruption or misdirection of the services they provide.

Explanation:

1.Skills

1.SkillsThe Top Skills Required for Cybersecurity Jobs

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...Attention to Detail. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...Attention to Detail. ...Communication Skills. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...Attention to Detail. ...Communication Skills. ...Fundamental Computer Forensics Skills. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...Attention to Detail. ...Communication Skills. ...Fundamental Computer Forensics Skills. ...A Desire to Learn. ...

1.SkillsThe Top Skills Required for Cybersecurity JobsProblem-Solving Skills. ...Technical Aptitude. ...Knowledge of Security Across Various Platforms. ...Attention to Detail. ...Communication Skills. ...Fundamental Computer Forensics Skills. ...A Desire to Learn. ...An Understanding of Hacking

2.Thesaurus

ThesaurusCybersecurity refers to the practice of securing electronic devices from unauthorized access or attack or the measures taken in pursuit of this practice.

3.Risk assessment

Risk assessmentWhat does a cybersecurity risk assessment include? A cybersecurity risk assessment identifies the various information assets that could be affected by a cyber attack (such as hardware, systems, laptops, customer data, and intellectual property), and then identifies the various risks that could affect those assets.

and last..........is four

4. Field

FieldDifferent branches of cyber security

FieldDifferent branches of cyber securityApplication security.

FieldDifferent branches of cyber securityApplication security.Network and infrastructure security.

FieldDifferent branches of cyber securityApplication security.Network and infrastructure security.Intrusion detection and penetration testing.

FieldDifferent branches of cyber securityApplication security.Network and infrastructure security.Intrusion detection and penetration testing.Digital forensics and incident response.

FieldDifferent branches of cyber securityApplication security.Network and infrastructure security.Intrusion detection and penetration testing.Digital forensics and incident response.Endpoint protection and mobile security.

FieldDifferent branches of cyber securityApplication security.Network and infrastructure security.Intrusion detection and penetration testing.Digital forensics and incident response.Endpoint protection and mobile security.Data governance, risk and compliance.

every CAD application comes with a color menu to help you tailor your selections, mix them properly, and apply them in ways that meet your artistic expectations

true or false

Answers

every CAD application comes with a color menu to help you tailor your selections, mix them properly, and apply them in ways that meet your artistic expectations is a true statement.

What is a color CAD?

In a CAD system, there is found to be colors that are known to be often and  most commonly used to depict line weights.

Note that selecting different colors is easy using varying line thickness. One can then use these colors into layers to smooth the visibility of drawing components that you wants.

Learn more about CAD application  from

https://brainly.com/question/9222927

Answer:true

Explanation:

what is computers machain?

Answers

Answer:

the electronic device which take data process it and give meaningful results is called computer machine

A person entering the field of financial analysis
will end up taking what kind of classes in
college?
A. accounting
B. agriculture
C. astronomy
D. advertising

Answers

Answer:accounting

Explanation:

9.12: Element Shifter
Write a function that accepts an int array and the array’s size as arguments. The function should create a new array that is one element larger than the argument array. The first element of the new array should be set to 0. Element 0 of the argument array should be copied to element 1 of the new array, element 1 of the argument array should be copied to element 2 of the new array, and so forth. The function should return a pointer to the new array. Demonstrate the function by using it in a main program that reads an integer N (that is not more than 50) from standard input and then reads N integers from a file named data into an array. The program then passes the array to your element shifter function, and prints the values of the new expanded and shifted array on standard output, one value per line. You may assume that the file data has at least N values.

Prompts And Output Labels. There are no prompts for the integer and no labels for the reversed array that is printed out.

Input Validation. If the integer read in from standard input exceeds 50 or is less than 0 the program terminates silently.

Answers

The Element shifter program illustrates the use of functions and arrays

Arrays are used to hold multiple valuesFunctions are used as subroutines of a program

The Element shifter program

The Element shifter program written in C++, where comments are used to explain each action is as follows:

#include <iostream>

using namespace std;

//This declares the ElementShifter function

int* ElementShifter(int *arr, int size){

   //This declares the new array

   int *newArr = new int[size * 2];

//The following loop populates the new array

   for (int i = 0; i < size * 2; i++) {

       if(i == 0){

           *(newArr+i) = 0;

       }

       else if(i < size+1){

           *(newArr+i) = *(arr+i-1);

       }

       else{

           *(newArr+i) = 0;

       }

   }

//This returns a pointer to the new array

   return newArr;

}

//The main method begins here

int main(){

//This declares and gets input for N

   int N;    cin>>N;

   int myArr[N];

//If N is between 1 and 50

   if(N > 0 && N <=50){

//This populates the array

       for(int i = 0; i<N; i++){

           cin>>myArr[i];

       }

//This calls the Element shifter function

   int *ptr = ElementShifter(myArr, N);

//This prints the new array

   for (int i = 0; i < N*2; i++) {

       cout << ptr[i] << " ";

   }

   }

  return 0;

}

Read more abou C++ programs at:

https://brainly.com/question/27246607

which of the following is an example of application software

Answers

Answer:

A messaging app

Explanation:

Its an software application you can download, so...yeah.

(You might've thought it was an anti-virus program lol)

Option-D.A messaging app is the correct answer.
A messaging app is an application software that can be installed jn your phone and computer in order to send messages.

What is an Application software?Application software is a type of computer application that performs specific professional, academic, and individualized functions.Each software is designed to assist users with a variety of tasks, some of which may be related to productivity, creativity, or communication.Word processors, media players, and accounting software are examples of application programs.An application program (also known as a software application, application, or app for short) is a computer program created to carry out a specific task other than one related to the operation of the computer itself.The term "app" typically refers to apps for mobile devices such phones. Applications may be published independently or packaged with the computer and its operating system software.They may also be written in proprietary, open-source, or project code.An application can work with text, numbers, audio, visuals, and a combination of these depending on the task for which it was created.Word processing is an example of an application package that focuses on a particular task.On the other hand, integrated software merges several programs.

To learn about the DIfference between application software and Opertaing system click here-
https://brainly.com/question/17798901

#SPJ2

Write a program that uses while loops to perform the following steps:
a. Prompt the user to input two positive integers. Variables: firstNum and secondNum
(firstNum must be less than secondNum) (use while loop); create a user-defined function
called validateUserInput() to validate the user's input. Use Call-by-Value.
validateUserInput() is a value returning function.

b. Output all odd numbers between firstNum and secondNum. (use while loop); create a
user-defined function called oddNumbers(). Use Call-by-Value. oddNumbers() is a void
function.

c. Output the sum of all even numbers between firstNum and secondNum. (use while
loop); create a user-defined function called sumEvenNumbers(). Use Call-by-Value.
Declare a variable called sumEven in the main() for the sumEvenNumbers().
sumEvenNumbers() is a valuereturning function. Use sumEven to hold a returned value.

d. Output the numbers and their squares between 1 and 10. (use while loop): create a
user-defined function called displaySquareNumbers(). Call-by-Value.
displaySquareNumbers() is a void function.

e. Output the sum of the square of the odd numbers between firstNum and secondNum.
(use while loop); create a user-defined function called sumSqureOddNumbers(). Use
Call-by-Value. Declare a variable called sumSquareOdd in the main(), for the

sumSqureOddNumbers(). sumSqureOddNumbers() is a value returning function. Use
sumSquareOdd to hold a returned value.

f. Output all uppercase letters. (use while loop); create a user-defined function called
displayUppercaseLetters(). Use Call-by-Value. displayUppercaseLetters() is a void
function.

Answers

The program is an illustration of the loop and functions

Loops are used to perform repetitive operationsFunctions are named code segments that ar executed when called or evoked

The main program

The program written in Python, where comments are used to explain each action is as follows:

#This function validates the user input

def validateUserInput(firstNum, secondNum):

   if firstNum >= secondNum:

       return False

   return True

See attachment for the complete program

Read more about loops at:

https://brainly.com/question/19347842

What are the major benefits of preproduction?

Answers

Some of the benefits of preproduction are that it:

Saves time while producingKeeps you on a BudgetYou could have more time to think about how you are going to produce your production.

Hope this could help?

The algorithm solves the problem
of size n by recursively solving
sub-problems of size n – 1, and
then combining the solutions in
Q(n) time.

Answers

Looking at the question on algorithm above, the correct answer is: [tex]O( {2}^{n} )[/tex]

What is algorithm?

Algorithm refers to a sequence of instructions that have been well-defined which helps to solve specific problems. Algorithm is used in computation.

The recurrence relation is:

T(n)=2.T(n-1)+c , n>0

T(n)=1, n=0.

Considering the back substitution method,

T(n) = 2kT(n-k)+ 2k-1c+....+20c

Substitute n-k=0

Therefore, we will have:

T(n) = 2nT(0)+ 2k-1c+....+20c

T(n) = [tex] {2}^{n - 1} + 1[/tex]

T(n) = [tex]O( {2}^{n} )[/tex]

Learn more about algorithm on https://brainly.com/question/24953880

what is the name of the extension used to save publisher

Answers

Answer:

PUB

Explanation:

PUB IS THE NAME OF THE EXTENSION USED TO SAVE PUBLISHER

ICT4AD was meant to modernize the civil service through E-governance implementation.

Explain why you believe that this policy has achieved or not achieved this goal?

Answers

ICT4AD work through E-governance implementation fail as a result of:

Lack of Infrastructure. High cost of running its affairs as it needs  huge public expenditure. Issues with Privacy and Security and others.

What is the aim of e-governance?

The objectives of e-Governance is created so as to lower the level of corruption in the government and to make sure of  fast administration of services and information.

Conclusively, It is known to fail due to the reasons given above and if they are worked on, the service would have prospered.

Learn more about civil service from

https://brainly.com/question/605499

nivel 1: operadores pedir 2 números al usuario y Sumarlos, restarlos, multiplicarlo y dividirlos ​

Answers

Answer:

¿Esta pregunta no tiene ningún sentido?

Explanation:

¿que estas pidiendo?

How many bytes can be stored in a 4gb flash drive

Answers

Answer:

4,294,967,296; theoretically

Explanation:

There is 1024 bytes in a kb, 1024 kb in a mb, 1024 mb in a gb.

So we can use 1024³ as a multiplier to convert gb->byte.

1024³ * 4 = 4,294,967,296 bytes.

However, in practice hardrives always have less useable storage than the quoted amount.

The major goal of a good web information
a
retrieval system is

Answers

Answer:

Explanation:

The major objective of an information retrieval system is to retrieve the information – either the actual information or the documents containing the information – that fully or partially match the user's query.



Computer A uses Stop and Wait ARQ to send packets to computer B. If the distance between A and B is 40000 km, the packet size is 5000 bytes and the
bandwidth is 10Mbps. Assume that the propagation speed is 2.4x108m/s
a) How long does it take computer A to receive acknowledgment for a packet?
b) How long does it take for computer A to send out a packet?

Answers

The time that it takes the computer to receive acknowledgment for a packet is 0.1667 seconds. The time it takes to send out a packet is  4 x 10⁻³seconds

1 The acknowledgment time for the packet

speed =  2.4x108m/s

Distance = 40000 km,

Time = distance/ speed

= 40000 x10³/ 2.4x10⁸m/s

= 0.1667

The time that it take is 0.1667 seconds.

b. Number of bytes = 5000

5000x 8 = 40000bits

10 mbps = 10000 kbps

10000 kbps = 10000000

packet size / bit rate = 40000/10000000

= 4 x 10⁻³seconds to send a packet out

Read more on computer bandwith here: https://brainly.com/question/27020560

a) Explain any two problems associated with the existing system used by the organization. (25 marks)​

Answers

Answer:

Lack of Strategy

Many of the most common MIS issues can be traced back to a lack of a solid strategy. Information systems leaders are well aware of the many tools available to gather data on their network. But putting that information to use is often a challenge.

At one time, technology departments served as a separate operation, providing tech support and keeping an organization’s server equipment running. Today, MIS leadership often sits alongside other business leaders, working together to ensure that the technology being used supports the overall mission of the company moving forward.

Meeting Organizational Needs

MIS plays an ever-increasing role in organizations, with professionals relying on technology for every aspect of operations. Sales and marketing rely heavily on customer relationship software to track client interactions, for instance, while accounting needs its own software for billing, invoicing and financial tracking.

With more than half of all companies now relying on big data analytics, MIS is playing an even more important role. Before making a decision, today’s management teams are likely to pull reports on existing activity to ensure they use facts rather than make educated guesses.

Explanation:

Name three things that get information into a computer?​

Answers

Answer:

Input devices do that. Three are the keyboard, a mouse, and a trackball.

Explanation:

what is containment and why is it part of the planning process

Answers

Answer:

Isolating affected channels, processes, services, or computers; stopping the losses; and regaining control of the affected systems. It is part of the planning process to identify the best containment option for each scenario or system affected.

Explanation:

What should I do instead of listen to music?

Answers

You could watch a movie
Learn something new that you are interested in

Name the test statement that can be used to test the following scenario:
The contents of the variable $TEST are equal to the string “success,” or the number 5, or the contents of the variable $RESULT.

Answers

The test statement is an illustration of conditional statements and logical operators.

The test statement is: if [[ "$TEST" == ”success” || "$TEST" == ”5” || "$TEST" == “$RESULT” ]]

How to name the test statement?

From the question, we have the following scenarios:

Determine if $TEST equals "success"Or $TEST equals "5"Or $TEST equals $RESULT

To do this, we make use of the if conditional statement and the or logical operator.

The or operator is represented with ||

Since the programming language is in php, the test statement is: if [[ "$TEST" == ”success” || "$TEST" == ”5” || "$TEST" == “$RESULT” ]]

Read more about conditional statements at:

https://brainly.com/question/24833629

Other Questions
match the following Spring tides happen 2 times each month at the _and_phasesNeap tides happen 2 times each month at the _and_phases A map of utah has scale 1cm :30 mi the southern border is about 285 mi long how long is the border on the map What group of people were the first to make slaves of the people of West Africa? a) Factorisex2 - 422 The consumer surplus will _____ by _____ when the United States engages in international trade and the international price for MP3 players settles at $50. WILL CHOOSE BRAINLIEST! Find the measure of BCX when a resident is using a bedpan you should You are shooting a rifle or handgun. what is the best way to pull the trigger for an accurate shot?. A rectangle has a length of 15 cm and a width of 11 cm. What is its perimeter?165 cm52 cm26 cm54 cm somehow it wont let me choose math sorry.... pls answer its important Trish is sorting bolts for her home repair business. She has an 8-pound bag of bolts. If each kitchen her team repairs requires 1/5 pound of bolts, how many kitchen can she repair? Joshua solves the problem by finding 8 1/5 = 40. Melanie solves the problem by finding 8 5 = 40. Use the drop-down menus to explain why Joshua and Melanie are both correct.Choose... a whole number by a unit fraction is the same as multiplying a whole number by the Choose... of the unit fraction. CHOOSE THING STUFF1st choose: MULTIPLYING or DIVIDING2nd choose: NUMBERATOR or DEMOMINATOR A suit is on sale for $414 , which is 28% less than the regular price.What is the regular price? I told you I would let you know,so here it is goodbye At the local level of government citizens have what power What happens if you still have abalance on your credit card AFTER thecompany starts charging you interest?A. The bank will extend the 0% APR so you don't payinterest.B. The bank will offer you a 0% so they make no moneyoff you.C. The bank will make your interest payments for you.D. The bank will make money from the interest fees youpay. Super easy 7th grade math worth a lot of points Why was Castro a strong opponent of the United States and its policies during the Cold War?HURRY HELP PLEASEEEE What is the best estimate of the area of the figure on the grid if each square has a side length of 1 inch?12 square inchesO 20 square inches25 square inchesO 33 square inches Which of the following numbers is a composite number? A. 11 B. 17 C. 23 D. 27