belongs to collection: String in C Programs
Reversing a string means changing the positions of the characters in such a way that the last character comes in the first position, second last on the second position and
#include<stdio.h> #include<string.h> int main() { char str[50],*revStr; printf("\nEnter Any String Without Space:\n\n "); scanf("%s",str); revStr = strrev(str); printf("\nReverse string is :\n\n %s",revStr); return 0; }
Output:
Enter Any String Without Space:
PROGRAMMING
Reverse String is :
GNIMMARGORP
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Output:
Enter Any String Without Space:
PROGRAMMING
Reverse String is :
GNIMMARGORP
need an explanation for this answer? contact us directly to get an explanation for this answer