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
kipiarov [429]
3 years ago
15

In the bubble sort algorithm, which code accomplishes swapping values in elements at positions index and index + 1? A. list[inde

x] = list[index + 1] list[index + 1] = list[index] B. list[index] = temp; list[index] = list[index + 1]; temp = list[index + 1]; C. temp = list[index]; list[index] = list[index + 1]; list[index + 1] = temp; D. list[index + 1] = list[index] list[index] = list[index + 1]
Computers and Technology
1 answer:
Sindrei [870]3 years ago
6 0

Answer:

Option (C)

Explanation:

While swapping two values, we need a temporary variable which needs to store the intermediate value. In bubble sort, in each pass we swap values if smaller element is found at advanced index. So, value at lower index is stored at temp variable and value of higher index is stored at lower one and then finally value at temp is stored at higher index.

Other options are wrong as they did not follow the sequence of swapping.

You might be interested in
Which of the following hacker attacks against wireless networks are virtually undetectable?
Ede4ka [16]

Answer: A. passive attacks

Explanation:

Passive attack is a type of attack where by a system is tracked and scanned to determine how vulnerable it is and to also detect open port. The major purpose of a passive attack on a network is to gain access to the information of the target without altering the data.

A passive attack on a network may not be necessarily malicious, it is a type of network attack that is very difficult to detect.

Methods of carrying out passive attacks.

•War driving: scanning of networks is carried out to detect Wi-Fi that are vulnerable.

•Dumpster driving: Attackers or intruders search for information from discarded computers and

other gadgets, those information can help to attack a network.

7 0
3 years ago
Which statement about intellectual property is true? (CSI-7.6) Group of answer choices It is okay to use code you find on the in
nika2105 [10]

Answer:

Laws are in place to cover your creative work, which includes code you have written.

Explanation:

Copyright law can be defined as a set of formal rules granted by a government to protect an intellectual property by giving the owner an exclusive right to use while preventing any unauthorized access, use or duplication by others.

A copyright can be defined as an exclusive legal right granted to the owner of a creative work (intellectual property) to perform, print, record, and publish his or her work. Also, the owner is granted the sole right to authorize any other person to use the creative work.

For instance, copyright law which protects the sharing and downloading rights of music is known as the Digital Millennium Copyright Act (DMCA).

An intellectual property can be defined as an intangible and innovative creation of the mind that solely depends on human intellect.

Simply stated, an intellectual property is an intangible creation of the human mind, ideas, thoughts or intelligence. They include intellectual and artistic creations such as name, symbol, literary work, songs, graphic design, computer codes, inventions, etc.

Hence, laws are in place to cover a person's creative work, and it includes code he or she have written.

6 0
3 years ago
Which feature of dart helps in making the code readable,maintainable and finds type error during compile time
devlian [24]

Answer:

Sound

Explanation:

Dart is object oriented. It's sound feature helps to make codes more maintainable and readable. The sound type system means that one can never experience w state where where an expression would evaluate to a value that wouldn't match that expressions static type.

The sound system makes the code to be unambiguous. It makes the code to be easier to read as types cannot lie, also your code would be more maintainable since when a piece of code gets to be changed, you would be warned of other pieces that may have gotten broken.

3 0
2 years ago
Explain how Steve Jobs created and introduced the iPhone and iPad.
Natali5045456 [20]

Answer:Today, we're introducing three revolutionary products. The first one is a widescreen iPod with touch controls. The second is a revolutionary mobile phone. And the third is a breakthrough Internet communications device. So, three things: a widescreen iPod with touch controls, a revolutionary mobile phone, and a breakthrough Internet communications device. An iPod, a phone, and an Internet communicator. An iPod, a phone...are you getting it? These are not three separate devices. This is one device. And we are calling it iPhone. Today, Apple is going to reinvent the phone.

Late last year, former Apple engineer Andy Grignon, who was in charge of the radios on the original iPhone, gave behind-the-scenes look at how Apple patched together demos for the introduction, with Steve Jobs showing off developmental devices full of buggy software and hardware issues. The iPhone team knew that everything had to go just right for the live iPhone demos to succeed, and they did, turning the smartphone industry on its head even as Apple continue to scramble to finish work on the iPhone.

Apple had actually been interested first in developing a tablet known as "Safari Pad", but as noted by a number of sources including Steve Jobs himself, the company shifted gears once it became clear how revolutionary the multi-touch interface developed for the tablet could be for a smartphone. Apple's tablet wouldn't surface until the launch of the iPad in 2010, three years after the introduction of the iPhone.

Seven years after the famous Macworld 2007 keynote, the iPhone has seen significant enhancements in every area, but the original iPhone remains recognizable as Apple has maintained the overall look of a sleek design with a larger touchscreen and a single round home button on the face of the device.

Explanation:

8 0
3 years ago
E-governance is the only solution against corruption. justify the statement in context of nepal​
notka56 [123]

Answer:

Following are the solution to this question:

Explanation:

The E-government implies use as part of the government systems to offer SMART, which is used to manage smart governance, ethics or accountability, sensitivity, and transparency. It is the research teams, that also shown that policies were progressing in India's creation of information technology. It is also argued against reducing the risk of bribery through improved public official surveillance and reducing its need for citizen engagement with porters with key services.

6 0
3 years ago
Other questions:
  • What is NOT a good habit when presenting to an audience?
    5·2 answers
  • Create a program to calculate the wage. Assume people are paid double time for hours over 60 a week. Therefore they get paid for
    10·1 answer
  • @anthonydboss23<br><br> it’s goldielove6 <br><br> .....this is not a question everyone ignore this
    11·2 answers
  • Networking and telecommunications technologies, along with computer hardware, software, data management technology, and the peop
    5·1 answer
  • Your it department enforces the use of 128-bit encryption on all company transmissions. your department also protects the compan
    13·1 answer
  • What type of display allows the user to access a large amount of vocabulary in one device, uses spelling to convey the message,
    10·1 answer
  • In a PC, which of the following components stores the BIOS
    6·1 answer
  • Which Internet connection type tends to use shared bandwidth?<br> Cable<br> Dial-up<br> DSL<br> ISDN
    5·2 answers
  • If html is used to specify the content of the webpage, then what do you use css for?.
    12·1 answer
  • A for construct is a loop construct that processes a specified list of objects. As a result, it is executed as long as there are
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!