C# Programming - Operators - Discussion

Discussion Forum : Operators - General Questions (Q.No. 16)
16.
What will be the output of the C#.NET code snippet given below?
int i, j = 1, k;
for (i = 0; i < 5; i++)
{
    k = j++ + ++j;
    Console.Write(k + " ");
}
8 4 16 12 20
4 8 12 16 20
4 8 16 32 64
2 4 6 8 10
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
11 comments Page 2 of 2.

Sasank said:   5 years ago
I did not understand the logic, please explain me @Megha S.


Post your comments here:

Your comments will be displayed after verification.