#include <stdio.h>
#include <stdlib.h>
void main()
{
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);
}
The output of above program is:
3 2 15,
I just want to know why? I am having trouble in understanding increment operator.