CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Evaluation Order in an Assignment

C# code walkthrough · Question 24
hardArrays

Code

Read carefully. What does this print?
1int i = 1;
2int[] a = new int[5];
3a[i++] = i++;
4Console.WriteLine($"{i} {a[1]} {a[2]}");

Your answer