fork(1) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. #define MLEN 20
  6.  
  7. int main(void) {
  8. char baka[MLEN];
  9. scanf("%s", baka);
  10. int l = strlen(baka);
  11. if(l < MLEN / 2){
  12. for(int i = l; --i >= 0; ++l) baka[l] = baka[i];
  13. baka[l] = '\0';
  14. }
  15. printf("[%s]", baka);
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0.01s 5664KB
stdin
qwertyuio
stdout
[qwertyuiooiuytrewq]