l9.c 295 B

12345678910111213141516
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main() {
  4. char pol[100];
  5. printf("Enter word ");
  6. scanf("%s", pol);
  7. int len = strlen(pol);
  8. if(len > 50) {
  9. printf("Error: too long\n");
  10. return 0;
  11. }
  12. strrev(pol);
  13. printf("Reversed: %s\n", pol);
  14. return 0;
  15. }