Strugle with strlen()

Hi, everyone! I’d like to ask why causes me to fail tests when I’m using strlen() to get the size of the input.

size_t length = strlen(sentence);

It would be helpful to see your complete solution and what the tests show.

#include <stdbool.h>
#include <string.h>
#include <stdio.h>

bool is_pangram(const char *sentence) {
size_t length = strlen(sentence);
    if(!length) return false;

return true;
}
Compiling tests.out
make: *** [makefile:22: test] Error -1073741819

Please take a closer look at the first test case and what it passes to the function.

Thank you. I solved it. :smile:

1 Like