int arr1[3] = {1,2,3};
int arr2[5] = {5,3,4,2,1};
for(int i = 0; i < 3; i++)
{
for(int j = 0; j < 5; j++)
{
if(arr1[i] == arr2[j]) // this will compare every number in the first array with every number in the second one
}
}
Keep in mind my if statement checks if they're equal. I don't know what you want to compare.