Q:

C program to reverse given string

0

C program to reverse given string

You can use below C program to reversing a string. If you want to get input string from user, please use scanf and printf in below program.

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 name[30] = "Hello";
 
   printf("String before strrev( ) : %s\n",name);
 
   printf("String after strrev( )  : %s",strrev(name));
 
   return 0;
 
}

Output:

String before strrev( ) : Hello

String after strrev( ) : olleH

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

total answers (1)

Similar questions


need a help?


find thousands of online teachers now