Question clarification!!!

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?

Thanks any help would be very appreciated
Last edited on
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
thank you @ats15 appreciate the help
Topic archived. No new replies allowed.