http://en.wikipedia.org/wiki/XOR_swap_algorithm
Answer as well as broaden you guys Concept on Memory.. Have a look On Fri, Jul 29, 2011 at 12:54 PM, tech rascal <[email protected]>wrote: > can u give an explanation for ...how xor method fails for same values?? > I think it will work right... > > > On Fri, Jul 29, 2011 at 12:26 PM, Prem Krishna Chettri <[email protected] > > wrote: > >> Replying to all the Above Code. >> >> 1> XOR operation to swap variable are not a solution as it fails for >> swapping of same value results 0. >> >> 2> the Short and Sweet looking various modification of code fails to swap >> data when U swap data between two different data type. >> >> >> So I suggest you all guys to use void pointer concept to get data Swap. >> >> >> Thx.. >> >> >> On Fri, Jul 29, 2011 at 11:35 AM, tech rascal <[email protected]>wrote: >> >>> @reynald: this won't work for floats........is there any other case u >>> can think of, where this method won't work?? >>> >>> >>> 2011/7/29 A for ♥ღAakasHღ♥ <[email protected]> >>> >>>> >>>> a=(a+b)-(b=a); >>>> >>>> >>>> *Aakash Abhishek Pradhan** >>>> **MCA Final Year, >>>> NIT Durgapur* >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Algorithm Geeks" group. >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]. >>>> 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 [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> 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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
