I guess I'll answer my own question! correct me if im wrong.
in the first case z = 10 + 20

in the second case
1. x = 10+20 = 30
2. x and y get incremented after 1. that is y is 21 and x is its value plus one, that is its current value 30+1 = 31