lenelex.com
Home
Quizzes
Games
Register
Log in
Question 1 of 20
What is the output of the following code snippet?
int n = 1; while (n++ < 4) { Console.Write(n); }
A. 123
B. 012
C. 111
D. 234
Postfix increment operation
The result of postfix increment operation is the value of the operand before it has been incremented. The value is modified only after the expression is evaluated.
Links:
The while Statement
The Increment Operator (++)