5.1k views
1 vote
Suppose that alpha and beta are int variables. The statement alpha = beta--; is equivalent to the statement(s) ____.

a. alpha = 1 - beta;
b. alpha = beta - 1;
c. beta = beta - 1;
alpha = beta;
d. alpha = beta;
beta = beta - 1

1 Answer

5 votes
d. The unary postfix decrement operator, when used in an expression, decrements the value of its operand but has the old value of the operand.
User Dlaor
by
8.9k points

No related questions found