Question: Description of program in the associated file CSC303_CodingAssignment2-NeedToModify.s: This program declares an array of 7 integers in the data section. Each integer is a word


Description of program in the associated file CSC303_CodingAssignment2-NeedToModify.s: This program declares an array of 7 integers in the data section. Each integer is a word in size. A function called find42 is defined in the code which called from main. The find42 function implements a loop which goes through the array of integers looking for the specific value 42. It returns the index of the number 42 if it is found, or the value - 1 if 42 is not there in the array. Specification of what you need to do: In the associated file, the 7 integers of the array are given different values in the data section. You must first change all those values to o in the data section. Next, implement a loop within the main function that assigns 7 integer values taken as inputs from the user, to the 7 locations of the array. After that loop ends, take one more integer input from the user - this value should be the value to find (not the fixed value 42 as in the associated code file). Next call the function findN, where the function find42 should be replaced by findN. The findN function must return the index of the number N if it is found, or the value -1 if N is not there in the array. Here N is the value to search for. Make necessary changes to the file and upload solution within a file of the name CSC303_CodingAssignment2_Solution_
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
