标签:style blog color ar sp div log bs 算法
字符串逆转
void reverse(char* str,int beg,int end) { int times = (end- beg +1)/2; while(times > 0) { char tmp = str[end]; str[end--] = str[beg]; str[beg++] = tmp; times--; } }
标签:style blog color ar sp div log bs 算法
原文地址:http://www.cnblogs.com/kangbry/p/4052127.html