Multiple choice c sharp

Find out the output for the code snippet given below:- int i=10; Console.WriteLine(i++);

  1. 10

  2. 11

  3. 12

  4. 9

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The post-increment operator (i++) returns the current value of i before incrementing it. So Console.WriteLine(i++) prints 10, then i becomes 11. If it were pre-increment (++i), it would increment first and print 11. This is a fundamental operator behavior in C-style languages.