How to reverse a string in c






C programming language code to reverse any string 


#include<stdio.h>
#include<string.h>
int main(){
    char str[50];
    char *rev;
    printf("Enter any string : ");
    scanf("%s",str);
    rev = strrev(str);
   
    printf("Reverse string is : %s",rev);
   
    return 0;
}


If you have any queries in above How to reverse a string in c, you can ask here. 




2 comments:

Anonymous said...

so simple

maleeha said...

very helping it is