mirror of
https://github.com/wangdoc/clang-tutorial.git
synced 2026-04-14 10:39:49 +08:00
docs(string): fix typo
This commit is contained in:
@@ -525,8 +525,8 @@ size_t fread(
|
||||
它接受四个参数,与`fwrite()`完全相同。
|
||||
|
||||
- `ptr`:数组地址。
|
||||
- `size`:数组的成员数量。
|
||||
- `nmemb`:每个数组成员的大小。
|
||||
- `size`:每个数组成员的大小,单位为字节。
|
||||
- `nmemb`:数组的成员数量。
|
||||
- `fp`:文件指针。
|
||||
|
||||
要将文件内容读入数组`arr`,可以采用下面的写法。
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user