I came across the calling conventions of C and by default the arguments are passed from right to left. So as per that first a++ will be passed that is the value 2 will be passed and also the value of a is now is 2 and after that ++a will be passed which is 3 and the value of a will now be 3 and in the last a will be passed. My question is when ++a and a++ have already been passed the value of a has been changed to 3. So should'nt the o/p for this code snippet be 3 3 3 rather than 3 3 1 which got after running the code.
#include<iostream>
{
int a=1;
printf("%d%d%d",a,++a,a++);
}