what type is x?

Yanan Cao



On Tue, Aug 21, 2012 at 9:25 AM, Wladimir Tavares <wladimir...@gmail.com>wrote:

>  Somebody could explain to me why this happen:
>  x = (1<<31);
>  printf("%d\n",x);
>  if(x<0) x = -x;
>  printf("%d\n",x);
>
> Output:
>
> -2147483648
> -2147483648
>
> Wladimir Araujo Tavares
> *Federal University of CearĂ¡ <http://lia.ufc.br/%7Ewladimir/>
> Homepage <http://lia.ufc.br/%7Ewladimir/> | 
> Maratona<https://sites.google.com/site/quixadamaratona/>|
> *
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to