I have this code:
#include<stdio.h>
main()
{
static int a[10];
int i=5;
a[i]=i++;// **statement 1**
printf("%d %d",a[6],a[5]);
}
I get the following output:
0 5
Since the assignment operator is RTL, shouldn't i++;
in statement 1 get incremented and then a[i] actually becomes a[6] before assignment?
Doesn't statement 1 evaluate to a[6]=5;
?
Why is a[5] becoming 5?