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
noname [10]
3 years ago
5

What is the effect of this program?

Computers and Technology
1 answer:
Mrac [35]3 years ago
8 0

Answer:

The answer is (C)

Let’s run the algorithm on a small input to see the working process.

Let say we have an array {3, 4, 1, 5, 2, 7, 6}. MAX = 7

  • Now for i=0,  i < 7/2, here we exchange the value at ith index with value at (MAX-i-1)th index.
  • So the array becomes {6, 4, 1,  5, 2, 7, 3}. //value at 0th index =3 and value at (7-0-1)th index is 6.
  • Then for i=1, i < 7/2, the value at index 1 and (7-1-1)=5 are swapped.
  • So the array becomes {6, 7, 1,  5, 2, 4, 3}.
  • Then for i=2, i < 7/2, the value at index 2 and (7-2-1)=4 are swapped.
  • So the array becomes {6, 7, 2,  5, 1, 4, 3}.
  • Then for i=3, i not < 7/2, so stop here.
  • Now the current array is {6, 7, 2,  5, 1, 4, 3} and the previous array was{3, 4, 1, 5, 2, 7, 6}.

Explanation:

So from the above execution, we got that the program reverses the numbers stored in the array.

You might be interested in
How to combine multiple documents into one pdf.
sergeinik [125]

Answer:

How to combine and merge your files into one PDF: Open Acrobat DC to combine files: Open the Tools tab and select "Combine files." Add files: Click "Add Files" and select the files you want to include in your PDF. You can merge PDFs or a mix of PDF documents and other files.

Explanation:

8 0
3 years ago
Martin has data in cell E14 and the cell should be blank . He should
pav-90 [236]

The answer is: use the mouse to click on cell E14 and press Delete.

8 0
3 years ago
NEED HELP WILL MARK BRAINIEST AND 100 POINTS FOR ANSWER!!!!What is an example of a composite key in a database table?
fgiga [73]

Answer:

cusomerid

Explanation:

5 0
3 years ago
Read 2 more answers
Write a program that inputs two characters first and second, and then prints all non-alphabetic characters starting from second
baherus [9]

Answer:

fbtcft gdfgfffff tvfft gxf

8 0
3 years ago
The research and development (R&amp;D) team of DataCom Corp., a software firm, holds a meeting to discuss potential ideas for ne
miss Akunina [59]

Answer:

brainstorming

Explanation:

The research and development (R&D) team of DataCom Corp., a software firm, holds a meeting to discuss potential ideas for new products. In the meeting, the moderator encourages everyone to share their ideas, no matter how trivial they may seem. He warns members against criticizing any idea and asks them to focus on offering plenty of ideas. In this scenario, the R&D team of DataCom is engaged in brainstorming.

3 0
3 years ago
Read 2 more answers
Other questions:
  • What is the name for an object that is what it appears to be?
    11·1 answer
  • Which of the following is an external hard drive
    11·1 answer
  • Why is Apple using social media ?
    15·1 answer
  • Create a list of consent rules to live by​
    5·1 answer
  • In a transaction-processing system (TPS), if the TPS database can be queried and updated while the transaction is taking place,
    10·1 answer
  • Which of the selections below represents a recursive query?
    12·1 answer
  • Some websites are dedicated to cataloguing information. Since these sites contain so much data, these sites are usually organize
    11·2 answers
  • Snippet 1: check_file_permissions.c #include
    9·1 answer
  • This is an example of what type of formula?
    7·1 answer
  • A government agency is getting rid of older workstations. The agency will donate these workstations, along with other excess com
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!