Ad
  • Custom User Avatar

    re-raised there

  • Custom User Avatar

    re-raised there with more details

  • Custom User Avatar

    the handling of acronyms / consecutive capital letters such as "requestHTTP" is not clear: should it be "request H T T P" or "request HTTP" ? the description should either specify it, or rule out 1-letter words

  • Custom User Avatar

    yes there is a mistake i missed, the bound of your for loop is incorrect, it refers to the length of the output, not of the input, so you loop out of bounds

  • Custom User Avatar

    oh, got it now. thank you very much!

    (ok, i corrected it like you said but still crashed in the same way.)

  • Custom User Avatar
    • you are missing 1 byte for the nul-terminator there:
      char *str = calloc(strLen, sizeof(char));
    
    • you are misunderstanding the contract of the is____() functions from <ctype.h>. the only guarantee is that they return a nonzero value if the character passes the predicate, and 0 otherwise. The nonzero value could be -42, 666, 1 etc.; it's an implementation detail that should not be relied upon. So:
      if(isupper(camelCase[i]) > 0) count++;
      
      should be:
      if(isupper(camelCase[i])) count++;
      
  • Custom User Avatar

    Everything worked with the CoreTests, but on the Random Tests it crashed: "Caught unexpected signal: 6". I printed both my input & output strings, and the output for the Random Tests is 100% correct. Don't really know what to do. (The language is C)