C Doubt

priyabc's Avatar, Join Date: Feb 2007
Light Poster
Code:
main()
{
    printf("%x",-1<<4)
}
the result for this code is

fff0

how does this result is obtained.. what is the actual process behind it...

Last edited by shabbir; 12Aug2007 at 06:24.. Reason: Code block - http://www.go4expert.com/forums/misc.php?do=bbcode#code
DaWei's Avatar, Join Date: Dec 2006
Team Leader
ffff is shifted left 4 bits, therefore the left-hand f disappears and a 4 bits of zero appear on the right. I mean it now, you are being silly and acting like a spoiled brat that expects everything to be provided without any effort on your part. Read some documentation.