Multiple choice technology mainframe

COMPARE ('APPLES', APPLESAUCE')?

  1. 7

  2. 8

  3. 9

  4. 10

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

COMPARE returns the position of the first character where two strings differ. 'APPLES' and 'APPLESAUCE' are identical for the first 6 characters (APPLES), but at position 7, the first string ends while the second has 'A'. Therefore, COMPARE returns 7.