/* Exercise 4-13. Write a recursive version of the function reverse(s), which reverses the string s in place. */ #include #include #define MAXLINE 1000 /* maximum input line size */ int my_getline(char line[], int maxline); void reverse(char s[]); main() { char line[MAXLINE]; while (my_getline(line, MAXLINE) > 0) { reverse(line); printf("%s\n", line); } return 0; } /* getline: read a line into s, return length */ int my_getline(char s[], int lim) { int c, i; for (i=0; i