Strrev() Function
- strrev() function refers to string reverse.
The general
format of strrev() function is:
Syntax: strrev(string);
Function is
used to reverse the contents of the given string.
/* PROGRAM TO PRINT A STRING IN
REVERSE ORDER */
#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
char
str[50];
clrscr();
printf("\nEnter
a String:");
gets(str);
strrev(str);
printf("\n
Reverse String = ",);
puts(str);
}
No comments:
Post a Comment