Q:

C Program For Reverse A String Using Library Function

belongs to collection: String in C Programs

0

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

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#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

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Program to Reverse a String in C | Using Loop, Rec... >>
<< C Program to Convert String Lowercase to Uppercase...