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

28 April 2024 Today I am going to explain verse 31 - 38 chapter two for you all. There is no opportunity better than a righteous war (सत्य औ...