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

We have two arrays A and B, each with 10 integers. Write afunction that tests if

ID: 3615730 • Letter: W

Question

We have two arrays A and B, each with 10 integers. Write afunction that tests if every element in array A is equal to itscorresponding element in array B. The function is to return true ifall elements are equal and false if at least one element is notequal. We have two arrays A and B, each with 10 integers. Write afunction that tests if every element in array A is equal to itscorresponding element in array B. The function is to return true ifall elements are equal and false if at least one element is notequal.

Explanation / Answer

please rate - thanks #include #include int compare(int[],int[]); int main() {int a[10]={1,2,3,4,5,6,7,8,9,0}; int b[10]={1,2,3,4,5,6,7,8,9,5}; if(compare(a,b))      printf("the 2 arrays are the same "); else      printf("the 2 arrays are not thesame "); getch(); return 0; } int compare(int a[],int b[]) {int i; for(i=0;i
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