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
Professionally, depending on your career, you might use Excel to:
morpeh [17]

1. To track inventory on excel you should have thorough knowledge on how it is used and different techniques and buttons behave on it. Tracking inventory may use formulas for example the total amount of items sold for the specific day. So where to right formulas and how to use them should be learned.

2.Track personal loan will take a little knowledge about the tool and again here also a little amount of formulas can be used and thus will need a little knowledge that where to write them but will need less knowledge than first one.

3.Evaluation of commitments will need a very low knowledge about tool and can be used easily.

4. Track a project It also need a little knowledge about the tool and will need least knowledge if compared with other options.

6 0
3 years ago
Which two editions of Windows 7 support 64 bit CPUs? Choose two out of Professional, Business, Starter, or Home Premium.
Tju [1.3M]
Home premium, professional
6 0
3 years ago
What will the following code display? #include using namespace std; void doSomething(int); int main() { int x{2}; cout &lt;&lt;
Leno4ka [110]

Answer:

The code will display the following on the screen:-

2

0

2

Explanation:

The output is like this because x{2} assigns the value 2 to the integer x.First the value of x is printed on the screen that is 2 and that newline is used to go to the next line.After that function is called doSomething with x passed as the argument. doSomething function assigns the value zero to the variable passed and prints it on the screen.So the next line is 0.Since x is passed by value so no changes will appear in the original argument.Hence the last line printed is 2.

8 0
3 years ago
How do you fix The lag on your zsnes emulator
GenaCL600 [577]
Try resetting the phone if that doesn’t work do a hard reset
7 0
3 years ago
PLEASE GET THE RIGHT ANSWERS AND HELP MEEE
Afina-wow [57]

Answer: #1 is A

Explanation: Parents often monitor what their child is doing online because online activities can be threatening and sometimes dangerous to a child's life, depending on what they come across on the web. just a hunch

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which are types of online resources that students can use for help? Check all that apply. simulated labs web-based educational g
    12·2 answers
  • What document type would be best to communicate sales items from a business to potential customer?
    12·1 answer
  • How people have contributed to the advancement of science
    7·1 answer
  • What is the problem with assigning a port number to more than one server application?
    8·1 answer
  • Can someone please help me with the three questions please?
    6·1 answer
  • What is the theory of trouble shooting
    10·2 answers
  • The Coins class was created to hold all your loose change, kind of like a piggy bank! For this exercise, you are going to simula
    15·1 answer
  • Describe markings on a road that indicate that it is safe to pass.
    10·1 answer
  • What is sum after the following loop terminates? int sum = 0; int item = 0; do { item ; sum = item; if (sum &gt; 4) break; } whi
    8·2 answers
  • Select the correct technical term for each definition by using the drop-down menus.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!