Multiple choice technology programming languages

What is the value of RESULT after the following process: C Z-ADD3 T 20 C MOVEL'ABCDEF' STRING 10 C 2 SUBSTSTRING:T RESULT 90

  1. CD

  2. BC

  3. DE

  4. EF

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

The RPG code sets STRING='ABCDEF', then uses SUBST to extract a 2-character substring starting at position 2 (C is the second character in 'ABCDEF'). The substring operation extracts positions 2-3, which gives 'CD'. MOVEL copies 'ABCDEF' left-justified into STRING, and SUBST with factor 2=2 and length=90 (effectively 2) extracts from position 2.