Re: 심사문제 47.5
, 도장_ 관리자님이 작성/tmp/157629895/main.c:18:10: error: array initializer must be an initializer list or string literal
char s1[30] = word;
^
/tmp/157629895/main.c:46:21: warning: incompatible pointer types passing 'char *[30]' to parameter of type 'const char *' [-Wincompatible-pointer-types]
length = strlen(sArr);
^~~~
/usr/include/string.h:394:35: note: passing argument to parameter '__s' here
extern size_t strlen (const char *__s)
^
1 warning and 1 error generated.이와 같은 에러가 발생합니다. 컴파일이 안 됩니다.온라인 컴파일러에서 실습해보셔도 됩니다.
https://glot.io/snippets/fkzd9fgm61