This is a sample code I have from someone and it runs giving the answers
3, 2, 15
Can someone please explain how this piece of code works and how it got to those outputs?
Code:
int a[5] = { 5, 1, 15, 20, 25 };
int i, j, m;
i = ++a[1];
j = a[1]++;
m = a[i++];
printf("%d, %d, %d", i, j, m);
_getch();