fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. char msg[] = "hogefuga";
  6. char *p, *e;
  7.  
  8. p = e = msg;
  9.  
  10. printf("%s\n", msg);
  11.  
  12. while (*++e) ;
  13. e--;
  14.  
  15. while (p < e) {
  16. char tmp = *p;
  17. *p++ = *e;
  18. *e-- = tmp;
  19. }
  20.  
  21. printf("%s\n", msg);
  22.  
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0.01s 1720KB
stdin
Standard input is empty
stdout
hogefuga
agufegoh