Can Somebody please explain how the output for the program below comes to 45 and 46 respectively.
the output obtained for the above program is 45 and 46.Code:#include<stdio.h> #include<conio.h> void main() { int x=10,y=10; clrscr(); //printf("%d\n",x+(++x)+x+(x++)+x); //printf("%d",(x++)+(++x)+x); x=(++x)+(x++)+x+x; printf("%d\n%d\n",x,(++y)+(y++)+y+y); //printf("value of x is %d",x+(++x)+x+(++x)); getch(); }
Thanks in Advance.