docs(string): fix typo

This commit is contained in:
ruanyf
2021-12-05 00:33:48 +08:00
parent 4efb23421c
commit 66f04c2f22
2 changed files with 3 additions and 3 deletions

View File

@@ -525,8 +525,8 @@ size_t fread(
它接受四个参数,与`fwrite()`完全相同。
- `ptr`:数组地址。
- `size`:数组成员数量
- `nmemb`每个数组成员的大小
- `size`每个数组成员的大小,单位为字节
- `nmemb`:数组成员数量
- `fp`:文件指针。
要将文件内容读入数组`arr`,可以采用下面的写法。

View File

@@ -406,7 +406,7 @@ puts(s1); // "helloworld"
`strncat()`用于连接两个字符串,用法与`strncat()`完全一致,只是增加了第三个参数,指定最大添加的字符数。在添加过程中,一旦达到指定的字符数,或者在源字符串中遇到空字符`\0`,就不再添加了。它的原型定义在`string.h`头文件里面。
```c
int strncat(
char* strncat(
const char* dest,
const char* src,
size_t n