摘要: #include <stdio.h> #include <stdlib.h> int main() { char a[]={'H','e','l','l','o'}; //定义了一个字符数组 char b[]={'H','e','l','l','o','\0'}; //定义了一个字符串 //字符串以 阅读全文
posted @ 2020-07-21 12:36 天子骄龙 阅读(182) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> int main() { int num=10; int *a; a=(int *)malloc(num*sizeof(int));//分配所需的内存空间,并返回一个指向它的指针(Void*类型) //malloc的返回值 阅读全文
posted @ 2020-07-21 08:07 天子骄龙 阅读(782) 评论(0) 推荐(1)