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
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
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:
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)
I do not know if the "consecutiveCApitals" should be considered a camel case or not, but in my opinion such kind of inputs should have been given in the Description accompanying the kata.
The assertion message says 'consecutive CApitals' should equal 'consecutive C Apitals'
That means your function returned consecutive CApitals, but it should have returned consecutive C Apitals, notice the space between the C and A in the expected return value?
You can see the input by printing it inside your code. In this case you can just add print(s) as the first line of code in your function.
Ah! I see what you did there you cheeky fella
I am chill even though it may not mean nothing to yall
Damn he seems like a chill guy
I gotchu
wowzers this was a doozy tried usigng soem weird list stuff first but then my good freiend @ItMayNotMeanNothingToYall came in and helped
arigatou my codewars nakama
re-raised there
re-raised there with more details
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 wordsyes 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 boundsoh, got it now. thank you very much!
(ok, i corrected it like you said but still crashed in the same way.)
is____()
functions from<ctype.h>
. the only guarantee is that they return a nonzero value if the character passes the predicate, and0
otherwise. The nonzero value could be-42
,666
,1
etc.; it's an implementation detail that should not be relied upon. So: should be: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)
I do not know if the "consecutiveCApitals" should be considered a camel case or not, but in my opinion such kind of inputs should have been given in the Description accompanying the kata.
@rowcased and @BobtheLantern, thank you! your comments allowed me to complete the kata!
The assertion message says
'consecutive CApitals' should equal 'consecutive C Apitals'
That means your function returned
consecutive CApitals
, but it should have returnedconsecutive C Apitals
, notice the space between the C and A in the expected return value?You can see the input by printing it inside your code. In this case you can just add
print(s)
as the first line of code in your function.Loading more items...