Here elements on index 3, 7, 9, and 10 of both arrays are same.
Detailed Description:
The program should take 10 integer inputs from user in arrray1 and array2.
• After taking inputs in both arrays, you should pass both arrays to a function named match.
• If both arrays are exactly same, the program should display a message “Both arrays are identical”.
• If both arrays are not exactly same, then program should match the indexes which have same elements in both arrays and display the matching indexes.
• If there is no element matching in both arrays, the program should display a message
“There is no matching element in both arrays”.
• Implementation regarding comparison of arrays and displaying message should be inside the function match.
Sample Output for two exactly same arrays
Please enter 10 integers for array1:
Enter element 1 : 1
Enter element 2 : 3
Enter element 3 : 5
Enter element 4 : 7
Enter element 5 : 9
Enter element 6 : 11
Enter element 7 : 13
Enter element 8 : 15
Enter element 9 : 17
Enter element 10 : 19
Please enter 10 integers for array2:
Enter element 1 : 1
Enter element 2 : 3
Enter element 3 : 5
Enter element 4 : 7
Enter element 5 : 9
Enter element 6 : 11
Enter element 7 : 13
Enter element 8 : 15
Enter element 9 : 17
Enter element 10 : 19
Both arrays are identical
Sample Output for arrays with some matching indexes
Please enter 10 integers for array1:
Enter element 1 : 1
Enter element 2 : 3
Enter element 3 : 5
Enter element 4 : 7
Enter element 5 : 9
Enter element 6 : 11
Enter element 7 : 13
Enter element 8 : 15
Enter element 9 : 17
Enter element 10 : 19
Please enter 10 integers for array2:
Enter element 1 : 2
Enter element 2 : 4
Enter element 3 : 5
Enter element 4 : 6
Enter element 5 : 9
Enter element 6 : 12
Enter element 7 : 14
Enter element 8 : 16
Enter element 9 : 17
Enter element 10 : 20
Both arrays have same elements on
Index 3
Index 5
Index 9