CJCoding With Joseph
← Back to Question List
C# Code Walkthrough #24

Evaluation Order in an Assignment

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