G
geo
#include <stdio.h>
int main()
{ int x=2048;
printf("%d\n",x);
printf("%d\n",((x<<2)>>2) );
printf("%d\n", (x<<2)>>2 );
printf("%d\n",((x<<2)>>2)-x );
printf("%d\n", (x<<2)>>2 -x );
}
Can you predict what five integers
will result from compiling and running
the above program?
Will all compilers give the same results?
int main()
{ int x=2048;
printf("%d\n",x);
printf("%d\n",((x<<2)>>2) );
printf("%d\n", (x<<2)>>2 );
printf("%d\n",((x<<2)>>2)-x );
printf("%d\n", (x<<2)>>2 -x );
}
Can you predict what five integers
will result from compiling and running
the above program?
Will all compilers give the same results?