Consider the below program
#include <stdio.h>
void main(){
int p = -8;
int i = (p++, ++p);
printf("%d\n", i);
}
I am unable to get why the output is -6.
p++ would increment after the assignment statement is executed, ++p will increment before thereby making -8 to -7.
How i is assigned -6?