i figured it out. I didnt know before that is was in 2's complement form . On Fri, Jul 29, 2011 at 11:53 PM, sukhmeet singh <sukhmeet2...@gmail.com>wrote:
> I couldn't understand the problem .. u have used %x as indentifier that why > it is so > > On Fri, Jul 29, 2011 at 11:37 PM, Ankur Khurana > <ankur.kkhur...@gmail.com>wrote: > >> Please explain the output, that why is it in that form in hexadecimal form >> >> >> #include<stdio.h> >> >> int main() >> { >> printf("%d %x",-1<<1,-1<<1); >> return 0; >> } >> >> >> output : >> >> -2 fffffffe >> >> >> -- >> 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. > -- Ankur Khurana Computer Science Netaji Subhas Institute Of Technology Delhi. -- 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.