Runtime error

Vitor Bisterso dos Santos asked 1 year ago

Em todos os casos que eu testei meu programa deu a saída esperada, mas quando eu faço a submissão, o site me devolve um "runtime error". Alguém sabe o que poderia estar acontecendo? Abaixo segue o meu código. My program gave the expected output for all of the inputs that I have tested it, but when I submit my code, it gets a "runtime error". Does anybody know what can it be? Here is my code:

Question solved. Code removed.

This topic was solved and cannot recieve new replies.

  • feodorv replied 1 year ago

    I've got SIGSEGV with this simple input:


    You do not check the string character on '\0' (string end) while traversing the string:

        while (l[*initialIndex] != ' ') {
          nextWord[j] = l[*initialIndex];
  • Vitor Bisterso dos Santos replied 1 year ago

    Thank you so much for your help FEODORV. After implementing your suggestion, my code did not receive a "runtime error"!