Ad
  • Default User Avatar

    in C:
    char* replaceNth(const char* text, int n, char oldValue, char newValue)

    Where does the char * returned point to?
    You can not change the const char *. Of course you can. it is 'C' , but not favorable.
    I can allocate memory, but who will delete it??

  • Default User Avatar

    What is the execution time of the routine? It got to be big (in computing time)