Q:

C program to reverse a string

0

C program to reverse a string

C program to reverse a string that a user inputs. If the string is "hello" then, the output is "olleh." 

All Answers

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

#include 
#include 
int main()
{
   char s[100];

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

   strrev(s);

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

   return 0;
}

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