Write tableDiff, a function that compares two arrays of integers and returns
the subscript of the first place they differ. If the arrays are the same, the
function returns -1. First write it using array subscripting and then using
pointers.
Just trying to understand what's being asked here ... "and returns
the subscript of the first place they differ" ... can someone explain what they are asking here?
are they asking for the position in the array where they both differ?
if a contains 2,5,7,18, 3 and b contains 2,5,8,18,17 your function should return 2. a[0]==b[0], a[1]==b[1], a[2]!=b[2]. At this point, you don't check the rest