Thread
:
Reverse String in C (w/o STL or New Buffer)
View Single Post
11-08-2005, 03:37 PM
#
6
(
permalink
)
QUantumAnenome
Code Monkey
Join Date: Mar 2005
Posts: 56
Don't really need tmp.
Code:
tmp=str[i]; str[i]=str[j]; str[j]=tmp;
can be rewritten as
Code:
str[i] ^= str[j]; str[j] ^= str[i]; str[i] ^= str[j];
QUantumAnenome
View Public Profile
Find More Posts by QUantumAnenome