随笔分类 -  C语言

摘要:一、C语言标准库中字符处理函数许包含头文件 <string.h>,常用字符串吹函数列表如下: 1 计算字符串长度 size_t strlen(const char *str); //不包含结束符'\0' 2 字符串拷贝 char *strcpy(char *dest, const char *src 阅读全文
posted @ 2019-08-20 11:23 博1990 阅读(903) 评论(0) 推荐(0)
摘要:一、在Linux的文件系统调用中,所有函数都是根据文件描述符fd来访问文件的,如下: 1 文件描述符的创建和关闭 int open(const char *path, int oflag,...); //成功则返回文件描述符fd,出错则返回-1 int create(const char *path 阅读全文
posted @ 2019-08-19 21:20 博1990 阅读(742) 评论(0) 推荐(0)