468,765 views
6 votes
6 votes
Write a function that can find the largest item in the array and returns it. The function takes the array as an input. From the main function, send initial address, type and length of the array to the function. You can use registers to send the data to the function. Also return the largest item in the array using EAX register. You can use the following array for this problem. Array DWORD 10, 34, 2, 56, 67, -1, 9, 45, 0, 11

User Mllamazares
by
2.7k points

1 Answer

9 votes
9 votes

Answer:

var newArray = array.OrderByDescending(x => x).Take(n).ToArray();

Step-by-step explanation:

Write the find_index_of_largest() function (which returns the index of the largest item in an array). Eg: a = [1 3 5 2 8 0]; largest = find_index_of_largest ( a ); largest = 5; Question: Write the

User Leopal
by
2.3k points