This is an ugly code used only to terrorize job applicants during interviews... But I cannot understand the logic behind it. Can someone explain why the expression with "b" is not equal to the one with "a"?
#include <stdio.h>
void main(){
int a = 1, b = 1, c = 1;
printf("%d %d %d", ++a + a++ + 1, 1 + ++b + b++, ++c + c++); // displays 6 5 5
}
Thank you very much.