fork download
  1. #include <stdio.h>
  2.  
  3. void reverse(char *arr)
  4. {
  5. if (*arr != '\0'){
  6. reverse((arr + 1));
  7. printf("%c", *arr);
  8. }
  9. }
  10.  
  11. int main()
  12. {
  13. char input[30];
  14.  
  15. scanf("%29[^\n]s", input);
  16. reverse(input);
  17. return (0);
  18. }
  19.  
Success #stdin #stdout 0s 4480KB
stdin
ola mae
stdout
eam alo