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

Need Help with C++ Please? 1. You are given a 6x8 (6 rows, 8 columns) array of i

ID: 3620502 • Letter: N

Question

Need Help with C++ Please?
1. You are given a 6x8 (6 rows, 8 columns) array of integers, x, already initialized and three integer variables: max, i and j. Write the necessary code so that max will have the largest value in the array x.


2. Write the definition of a function, isReverse , whose first two parameters are arrays of integers of equal size, and whose third parameter is an integer indicating the size of each array. The function returns true if and only if one array is the reverse of the other. ("Reverse" here means same elements but in reverse order.)


I tried this but it was wrong;

isReverse=1;
i = 0; /* first element */
j = c - 1; /* last element */
do {
if (a[i] != b[j]) {
retval = 0; /* lists are not equal */
break; /* don't need to do any more checks */
}
else {
i++; /* C language shorthand to increment i */
j--; /* C language shorthand to decrement j */
}
} while (i < c);
return retval;

Explanation / Answer

please rate - thanks please message me if there is a problem, before you rate, we can get it fixed to your liking
-------------------------------------------- you were very close
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