Program to check if two arrays are equal or not | faceprep

Program to check if two arrays are equal or not | faceprep

The program to check if two arrays are equal or not is discussed here. Given two arrays, display “Same” if both arrays are equal. Else, display “Not Same”.


Input format:

  • Input consists of 2 integers and 2 arrays.
  • Integers correspond to the size of arrays.
  • If two arrays are the same, display “Same” else display “Not Same”

Sample Input:

3

3

1

2

3

1

2

3

Sample output:

Same


program to check if two arrays are equal or notClick here to learn more about FACE Prep PRO


Algorithm to check if two arrays are equal or not

  • Input the number of elements of arr1 and arr2.
  • Input the elements of arr1 and arr2.
  • If all the elements of arr1 and arr2 are equal, then print “Same”.
  • Else, print “Not Same”.


Program to check if two arrays are equal or not

@@coding::1@@


program to check if two arrays are equal or notClick here to learn more about FACE Prep PRO


Recommended Programs


Program to check if two arrays are equal or not


c