int main(){
int a[5]= {5, 1, 15, 20, 25};
int i, j, k=1, m;
i = ++a[1]; // i becomes a[1] + 1 which is 2 but a[1] changes to 2 even though I'm assigning a value to i?
j = a[1]++; // j becomes a[1]+1 which is 2+1 but stay as 2?
m = a[i++]; // because i is 2, shouldn't the output be a[3]?
printf("\n%d %d %d", i, j, m);
return 0;
}
In this code, the output comes out as 3, 2, 15.
How does the increments work specifically? Thank you.