2015年6月8日

模拟链表

摘要: #include #include #include #define LEN sizeof(struct student) // student结构的大小struct student *creat(); //创建链表void print(struct student *hea... 阅读全文

posted @ 2015-06-08 23:15 木屐 阅读(174) 评论(0) 推荐(0) 编辑

动态存储分配

摘要: 常用的内存管理函数有三个:1、分配内存空间函数malloc、calloc2、释放内存空间函数freemalloc:函数原型为void *malloc(unsigned int size);其作用是在内存的动态存储区中分配一个长度为size的连续空间(size是一个无符号数)。此函数的返回值是一个指向... 阅读全文

posted @ 2015-06-08 22:12 木屐 阅读(186) 评论(0) 推荐(0) 编辑

结构体指针

摘要: #include struct stu{ int num; char *name; char sex; float score; } boy1 = {102, "Fishc", 'M', 78.5};vo... 阅读全文

posted @ 2015-06-08 21:46 木屐 阅读(171) 评论(0) 推荐(0) 编辑

导航