Q:

C Program For Reverse A String Using Library Function

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)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now