basics · beginner · ~15 min
Combine the two-pointer pattern with C strings.
Implement void reverse(char *s) that reverses the null-terminated string s in place.
#include <string.h>
void reverse(char *s) {
/* TODO */
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.