
C语言基础
QX大黄蜂
博客内容属个人经验杂记,如有错误,概不负责。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
malloc() free() realloc()内存使用与释放注意事项
1、头文件: #include "stdio.h" #include <stdlib.h> //内存函数相关 #include <string.h> //memset() strcpy()函数相关 2、内存范例: #include "stdio.h" #include <stdlib.h> #include <string.h...原创 2019-12-20 17:34:26 · 623 阅读 · 0 评论 -
c语言 字符串数组与指针字符串的区别
#include "stdio.h" int main(void) { char *str = "hello world\r\n"; //指针类型初始化字符串,只读, //"hello world\r\n"存储在常量区 char buf[] = "hello world\r\n"; //数组类型初始化字符...原创 2019-12-20 10:50:14 · 242 阅读 · 0 评论