Notices
 

Reverse string using recursion

For page specific messages
For page author info

I am very excited. I got this program....

Dear Friends,

I got a recursive program for reversing a given string. This is so impressive.

 

#include <stdio.h>
void reverse()
{
        char ch;
        ch=getchar();
        if(ch!='\n')reverse();
        putchar(ch);
}
void main()
{
        reverse();
        printf("\n");
}

 

 

 

 

 
X