Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Find MAX/MIN values in an array using assembly functions that are callable from

ID: 3597763 • Letter: F

Question

Find MAX/MIN values in an array using assembly functions that are callable from C++.

This is what i have done, but it doesn't work when i try to run it. Please help me to figure what i did wrong. Explain and show your work. Thank you

Write a C++ program that does the following:

1) Declare an array of integers (size is your choice)--your program should work with any array size.

2) Call an assembly function to compute the largest (max) of all elements in the array (pass the array and the size of the array). Need to search for the largest value in the array(.asm) and display(.cppp)

3) call an assembly function to compute the smallest (min) of all elements in the array (pass the array and the size of the array)

Explanation / Answer

#include using namespace std; extern"C"{ int average(int*,int); int max(int*, int); int min(int*, int); } int main() const int SIZE = 7; int arr[SIZE] = {1,2,3,4,5,6,7}; int val = average(arr,SIZE); int val2 = max(arr, SIZE); cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote