can someone explain how this works- * * *void* *main*(){ *int* a,b,d; scanf("%d%d",&a,&b); d=a+~b+1; printf("%d",d); getch(); }
say if a=5 b=6 then output is -1 if ~ is one's complement operator then a=0101 ~b=1001 d= 0101+1001+1. which is not -1 can someone explain how it works. -- Regards, Ayswarya S -- 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.