Here are a few questions to help you clarify your understanding of the shorthand operators.
Express each of the following expressions in terms of the short-hand operators. Show ALL possible translations! (All of the variables used are of an integral type.)
x = y * x
x *= y
c = c % (u - 4)
c %= u - 4
i = 1 + i
i += 1 i -= -1 i++ ++i
j = -1 + j
j -= 1 j += -1 j-- --j
k = -3 + k
k += -3 k -= 3
x = (8 - y) * x + z / 12
x *= 8 - y; x += z / 12;
Express each of the following expressions in terms of the normal operators.
x /= z - 2
x = x / (z - 2)
a += 3 - b
a = a + 3 - b
q++
q = q + 1
p--
p = p - 1
u %= i + 6 / p
u = u % (i + 6/p)
h -= y * 2;
h += 4 / q;
h = h - y*2 + 4/q;