What Will Be The Output Of The Following C Codep Pre Langcsharp #78
What will be the output of the following C# code?</p> <pre><code class="language-csharp"> m = 5; int y; 1. y = m++; 2. y = ++m; </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Data Types, Variables and Operators - Relational and Logical Operators - Quiz No.1.
What will be the output of the following C# code?
m = 5; int y; 1. y = m++; 2. y = ++m;
y = 5, m = 6 ; y = 5, m = 5
y = 6, m = 6; y = 7, m = 6
y = 5, m = 6; y = 7, m = 7
y = 5, m = 6; y = 7, m = 8