2
int x=4, y=0;
y=(++x)+(++x);
printf("%d\n%d",x,y);

In this program y should be 11 and x should be 6, but my C program prints y=12,x=6 and my Java program prints y=11, x=6. I am very much confused and need to know why the C program prints y=12?

4

0 に答える 0