Ask Question

Given the function definition below, what is the effect of thecall:

change (ar, 0, n-1);

where n is the size of array ar?

void change (int ar[], int low, inthigh)

{

inttemp;

if (low< high)

{

temp = ar[low];

ar[low] = ar[high];

ar[high] = temp;

change (ar, low + 1, high - 1);

}

}

A. Sort the first n elements of ar inascending order

B. Reverse the first n elements of ar

C. Switch the first and last elements ofar

D. Sort the first and last elements ofar

E. None of the above

+3
Answers (1)
  1. 6 October, 03:10
    0
    The correct answer is E.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Given the function definition below, what is the effect of thecall: change (ar, 0, n-1); where n is the size of array ar? void change (int ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers