So, I read that:
char pattern[] = "ould";
is basically a simpler way to write:
char pattern[] = { 'o', 'u', 'l', 'd', '\0' };
I understand that a null character \0marks the end of a line, but what if I write it like this:
char pattern[] = { 'o', 'u', 'l', 'd'}; (without \ 0)
It is still compiling.
Where patternwithout \0causes problems because it seems to compile without warnings ( -Wall)
source
share