4 ms·
Cute way to reverse a string, taken from the K+R: for (i = 0, j = strlen(s)-1; i < j; i++, j--) c = s[i], s[i] = s[j], s[j] = c;
by cron 15y ago
Cute way to reverse a string, taken from the K+R:
for (i = 0, j = strlen(s)-1; i < j; i++, j--)
c = s[i], s[i] = s[j], s[j] = c;