C语言-求字符串长度-strlen()与sizeof()
- 2020 年 4 月 8 日
- 筆記
需要在代码头部加上标准库<string.h>
代码示例
#include <string.h> char s1[20] = "hello world"; char s2[20] = {'h','e','l','l','0',' ','w','o','r','l','d','
需要在代码头部加上标准库<string.h>
代码示例
#include <string.h> char s1[20] = "hello world"; char s2[20] = {'h','e','l','l','0',' ','w','o','r','l','d','