#include #include #include int main(void) { char qq[] = {\'a\' , \'b\' , \'c\' , \'d\'}; char qqq[] = \"abcd\";
Your string is not null-terminated. That means your code is not deterministic. strlen() will terminate whenever it encounters a \0 (null byte/character); the result can vary due to it sequential scanning until the \0 is encountered.
strlen()
\0