I have just find strange answer, 10 x 1036778084 = 1777846248??

I'm using gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 and gcc (GCC) 4.8.5
20150623 (Red Hat 4.8.5-4).
These are same results, 10 x 1036778084 = 1777846248

C Lang:

printf("%d \n", atoi("10367780849"));
     1777846248
Result is 1777846257, and also following source,

        int y = 1036778084;
        int x = 10;
        int z;

        z = x * y;
        printf("%d x %d = %d\n", x,y,z);

10 x 1036778084 = 1777846248





--
View this message in context: 
http://gcc.1065356.n5.nabble.com/10-x-1036778084-tp1279231.html
Sent from the gcc - bugs mailing list archive at Nabble.com.

Reply via email to