1 #include <stdio.h> 2 #include <string.h> 3 4 int main(void) { 5 6 char s[] = "Hello world!\n"; 7 int i, aux; 8 9 for(i = strlen(s); i >= 0; i--) { 10 aux = s[i]; 11 if(aux != '\n') 12 putchar(aux); 13 } 14 putchar('\n'); 15 return 0; 16 }
9511_workbooksolved exercises from algorithms & programming I (9511) prof. Cardozo |