Reverse a string [strrev()]|| string manipulation in C || C programming
In this, we are going to see a program in which an inputted string is reversed using an in-built function of string.h header file in C Programming Language.

//Reverse a string using strrev()

#include <stdio.h>
#include <string.h>

int main()
{
    char s[100];

    printf("Enter a string to reverse\n");
    gets(s);

    //using strrev() to reverse string s
    strrev(s);

    printf("Reverse of the string: %s\n", s);

    return 0;
}

//..........coded by ANANYA MAURYA

#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post