Multiple choice technology programming languages

DATA: ULTIMO TYPE D. ULTIMO = SY-DATUM. ULTIMO+6(2) = '01'. ULTIMO = ULTIMO - 1. write: ultimo.

  1. 1 year lesser than current date

  2. 1 month lesser than current date

  3. 1 day lesser than current date

  4. 1 year, 1 month, 1day lesser than current date

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

The code manipulates the date to find the last day of the previous month. ULTIMO starts as current date, then the day portion (positions 6-7) is set to '01' using ULTIMO+6(2) = '01'. This makes it the first day of the current month. Subtracting 1 from this gives the last day of the previous month. The result is one day less than the first of the current month, which is the last day of the previous month. Option C is correct - it's one day less than the current date (technically one day less than the first of the current month).