Multiple choice technology mainframe

x=12 y=4 z=x%y What is the value of z?

  1. 0

  2. 3

  3. 4

  4. 12

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

In REXX, the % operator performs integer division (truncating the fractional part). 12 divided by 4 equals exactly 3, so z=3. Options 0, 4, and 12 are incorrect calculations. The % operator specifically returns the quotient without remainder, unlike / which preserves decimal results.