i am just learning about a++, ++a, a=a+1 .....so i write a code to understand it.
but it is printing unexpected output.
i think output should be 1 2 2 but i am getting 3 3 1.
what does it mean ?
output : 3 3 1
but it is printing unexpected output.
i think output should be 1 2 2 but i am getting 3 3 1.
what does it mean ?
#include<stdio.h>
#include<conio.h>
main()
{
int i=1;
printf("%d %d %d",i,++i,i++);
getch();
}
output : 3 3 1