What will be the output of the C#.NET code snippet given below?

Loading

โœช Choose the correct option.

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 + " ");
}

A. 8 4 16 12 20
B. 4 8 12 16 20
C. 4 8 16 32 64
D. 2 4 6 8 10

Leave a Comment