文章目录 1 字符串拷贝函数1.1 全拷贝函数 strcpu1.1.1 例子 1.2 拷贝N个字符 strncpy1.2.1 常见错误1.2.2 例子 1 字符串拷贝函数 1.1 全拷贝函数 strcpu 1.1.1 例子 strcpy(dest, source); 1.2 拷贝N个字符 strncpy 1.2.1 常见错误 常见错误,不能用错入参 1.2.2 例子 strncpy(word, s + i, wordLen);