English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Example:

Output: Sample Program
Input: margorP elpmaS

2007-02-21 18:01:11 · 1 answers · asked by jason t 1 in Computers & Internet Programming & Design

1 answers

#include
#include
#include

int main() {

char s[1000];
int i;
int len=0;

while (1) {

printf("\n\n\tEnter a string : ");
gets(s);

printf("\n");

for(i=0;s[i];i++) {
printf("%c",s[i]);
}
len=strlen(s);
printf("\n\n");
for(i=len-1; s[i], i>=0; i--)
printf("%c",s[i]);
}
return 0;
}

2007-02-21 18:12:00 · answer #1 · answered by iyiogrenci 6 · 1 0

fedest.com, questions and answers