Sunday, February 25, 2018

C Recursive Program which outputs the line with the characters reversed.

Example:
INPUT
This is easy

OUTPUT
ysae si sihT

 #include<stdio.h>
void reverse()
{
int c = getchar();
  if (c != EOF) {
    reverse();
    putchar(c);
  }
}

int main()
{
 
  reverse();
  return 0;
}

Thanks
Happy Computing !

No comments:

Post a Comment

Sacred Thought

5 May 2024 Hari Om Verse 50-51, chapter two:  In this chapter two Shree krishna explains a simple way of living. Free from desires and void ...