+ 23
How can i print name which the user enter and reverse the string in C?
2 Answers
+ 15
#include <stdio.h>
#include <string.h> Â
int main() {
char arr[100]; Â
printf("Enter a string to reverse\n");
gets(arr); Â
strrev(arr); Â
printf("Reverse of the string is \n%s\n", arr); Â
return 0;
}
+ 1
you can also use loops