Thursday 10 September 2015

Reverse string

#include < stdio.h >
#include<conio.h>
#include < string.h >
  int main()
{
  char arr[100];
  printf("Enter a string to reverse\n");
  gets(arr);
  strrev(arr);
//strrev(string) : reverses given sting
  printf("Reverse of entered string is \n%s\n",arr);
getch();
}

No comments:

Post a Comment