An example of a library function that does have an associated system call is the fopen function declared in stdio.h.
有相关系统调用的库函数的一个示例是stdio . h中声明的fopen函数。
It returns NULL, defined in stdio.h, for either error or EOF [end-of-file]; after the loop, we check for which one occurred.
对于错误或EOF[文件结束],它都返回NULL,这是在stdio . h中定义的;循环结束后,我们会检查究竟是哪种情况。
This can happen if the string copied into s1 is longer than the allocated size of s1, which is BUFSIZ (a constant defined in stdio.h).
当复制到s1的字符串长于 s1 的分配大小(即BUFSIZE,一个在stdio.h中定义的常数)时,就会发生缓冲区溢出情况。
This can happen if the string copied into s1 is longer than the allocated size of s1, which is BUFSIZ (a constant defined in stdio.h).
当复制到s1的字符串长于 s1 的分配大小(即BUFSIZE,一个在stdio.h中定义的常数)时,就会发生缓冲区溢出情况。
应用推荐