+ 23
How can i print name which the user enter and reverse the string in C?
2 Réponses
+ 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