fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main() {
  5. char text[256];
  6. printf("Введите текст: ");
  7. fgets(text, sizeof(text), stdin);
  8.  
  9. int len = strlen(text);
  10. if (text[len - 1] == '\n') text[--len] = '\0';
  11.  
  12. for (int i = len - 1; i >= 0; i--)
  13. putchar(text[i]);
  14.  
  15. printf("\n");
  16. return 0;
  17. }
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
Введите текст: �$��G