fork download
  1. #include <stdio.h>
  2.  
  3. char *deslash(char *input) {
  4. char *goodpointer = input;
  5. char *badpointer = input;
  6. while(*goodpointer != 0) {
  7. *(++goodpointer) = *(++badpointer);
  8. while(*(++badpointer) == '/');
  9. while(*badpointer != '/' && *badpointer != 0)
  10. *(++goodpointer) = *(++badpointer);
  11. if(*badpointer = 0)
  12. *goodpointer = 0;
  13. }
  14. return input;
  15. }
  16.  
  17. int main(void) {
  18. // your code goes here
  19.  
  20. printf(deslash("/testing//stratesting///stssdf/dfsf"));
  21.  
  22. return 0;
  23. }
  24.  
Runtime error #stdin #stdout 0s 2156KB
stdin
Standard input is empty
stdout
Standard output is empty