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
Which of the selection below does not represent a workable IP address?
gogolik [260]

Answer:

ipv4 ip addresses will be 4 sets of numbers to a maximum of 255 per set ie the highest ipv4 number is 255.255.255.255 ipv6 use hexadecimal and has many more addresses ie ipv6 0:0:0:0:0:ffff:ffff:ffff is = to ipv4  255.255.255.255

Explanation:

8 0
3 years ago
What is the purpose of quick access toolbar?
Flauer [41]
Answer:

Toolbar grants direct (quick) access to a set of desired commands in a toolbar that is always visible no matter which ribbon tab is selected.

Explanation:


Given
8 0
2 years ago
Two different ways to bring up My Computer folder
seraphim [82]
On a Windows PC, My Computer is a folder on the desktop. Alternatively, you can click on Start and access My Computer from that menu.
5 0
3 years ago
Name 3 examples of operating system software that are not Windows based.
anyanavicka [17]
Ubuntu, Linux, and Mint
4 0
3 years ago
What is the missing part to have the output as 3 2 1 while count &gt;0 : print(count) count -= 1
Natali [406]

Answer:

Explanation:

16

6 0
2 years ago
Other questions:
  • Blogs are typically written by large companies or organizations as a way to express formal, technical, or scholarly information
    5·2 answers
  • What special member function of a class is called whenever an instance of a class is created and initialized?
    15·1 answer
  • Shakespeare’s complete works have approximately 3.5 million characters. Which is bigger in file size: Shakespeare’s complete wor
    5·2 answers
  • "The network layer is responsible for transferring packets of data from the A.Source computer to the destination computer on adj
    11·1 answer
  • .____________ is a way to identify and differentiate goods andservices through use of a name or distinctive design element.
    10·1 answer
  • Each entry in a linked list is called a_______
    11·1 answer
  • Which question about whale sharks is nonscientific?
    11·2 answers
  • Jettison folk 2007, Magnum opus, be moving, offers poisoned commentary on the film industry.
    7·1 answer
  • What type of e-mail typically lures users to sites or asks for sensitive information?
    7·1 answer
  • Classes that depend on field names from parent classes are said to be ____ because they are prone to errors.Group of answer choi
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!