Examveda

What will be the output of the following C# code?
m = 5;
int y;
1. y = m++;
2. y = ++m;

A. y = 5, m = 6 ; y = 5, m = 5

B. y = 6, m = 6; y = 7, m = 6

C. y = 5, m = 6; y = 7, m = 7

D. y = 5, m = 6; y = 7, m = 8

Answer: Option C


Join The Discussion

Related Questions on Operators and Expressions in C Sharp