> For the complete documentation index, see [llms.txt](https://fashaun.gitbook.io/dev-c/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fashaun.gitbook.io/dev-c/array/strings.md).

# Strings

\#String (由字元所組成的陣列, 結尾字元為空字串)

**所以我們可以利用字元宣告字串**

`char text[] = {'h', 'e', 'l', 'l', 'o', '\0'};`

`printf(text);`

`printf("%s\n", text);`

**C 如何認得字串 ?**

利用 空字串 '\0'

**宣告字串的第二種方式**

char text\[] = "hello"; // 此時 array size 已固定

**所以無法**

text = "Justin";
