asked 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.
answered
User Dlaor
by
8.9k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.