loading...

re: How can you swap two variables without using a third? VIEW POST

FULL DISCUSSION
 

It is worth noting that most compilers would convert the third variable into a cpu register thus not actually needing any extra memory.

 

The entire swap ends up using three registers I think.

code of conduct - report abuse