subject

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
question
Computers and Technology, 22.06.2019 20:30
In this lab, you complete a prewritten c program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. bonuses are calculated based on an employee’s productivity score as shown below. a productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Answers: 3
question
Computers and Technology, 23.06.2019 00:00
Suppose you have 9 coins and one of them is heavier than others. other 8 coins weight equally. you are also given a balance. develop and algorithm to determine the heavy coin using only two measurements with the of the balance. clearly write your algorithm in the form of a pseudocode using the similar notation that we have used in the class to represent sorting algorithms
Answers: 1
question
Computers and Technology, 23.06.2019 05:20
What did creator markus “notch" persson initially call his game
Answers: 1
You know the right answer?
Given the function definition below, what is the effect of thecall:
change(ar, 0, n-1);
Questions
Questions on the website: 13722367