Echo test failing, unable to reproduce failure locally

Hi all,

I’m having some trouble with the ‘Single quotes’ stage of the shell challenge (in C). I am receiving build failed messages (screenshot below). However, all my local testing and attempts to reproduce the issue (I’ve tried multiple repeat submissions with different input text, all failing for the same reason):

(Remote test fail on left, successful local result on right):

Is there something obvious I’m missing when I attempt to reproduce locally?

Thanks,

Zac

Hi @security-man, the test failed due to extra single quotes in the output:

The issue might be caused by this:

Since strcmp expects a null-terminated string, using a buffer with only 1 byte allocated might cause unexpected behaviors. There needs to be enough space for both the character and the null terminator.

Hi @andy1li - thank you so much for your prompt reply! I will investigate further and make the necessary changes to see if that resolves things, thank you.

1 Like

That worked a treat - now to fix the ‘cat’ portion of the submission!

Thanks again :slight_smile:

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.