Reply to comment
Reverse String in C
Tagged:
Below is a C program that will reverse (input) text.
#include<stdio.h>
int main(){
int length = 0;
char name[30];
printf("enter your name: ");
scanf("%[^\n]", name);
//determine the length of the string
while(name[length] != '\0')
length ++;
while(length >= 0){
printf("%c", name[length]);
length --;
}
return 0;
}
output:
![]()

Recent comments
5 days 3 hours ago
2 weeks 4 days ago
3 weeks 1 hour ago
3 weeks 1 hour ago
4 weeks 2 days ago
4 weeks 5 days ago
4 weeks 5 days ago
6 weeks 1 day ago
7 weeks 3 days ago
7 weeks 3 days ago