I need help understanding the increment operator and the output of this program.
I am confused with the output of 'i' and 'm' According to me: i = 4 and m = 20 but, that is not what you get when you compile. Please explain. Thanks in advance.
#include <stdio.h>
main( )
{
int a[5] = { 5, 3, 15, 20, 25 } ;
int i, j, k = 1, m ;
i = ++a[1] ;
j = a[1]++ ;
m = a[i++] ;
printf ( "\n%d %d %d %d", i, j, m, a[1] ) ;
}