正在加载图片...
清华大学出版社 TSINGHUA UNIVERSITY PRESS # include" stdlib.h"/米 malloc函数需要包含头文件 stdlib.h* struct node /*定义结点类型 i int d /*数据域*/ struct node next /*指针域* main struct node*p;/*定义该类型的指针变量p* p=(struct node *)malloc (sizeof (struct node)) /*申请分配结点存储空间*/ free(p);/*释放结点存储空间*#include "stdlib.h"/* malloc 函数需要包含头文件stdlib.h*/ struct node /*定义结点类型*/ { int d; /*数据域*/ struct node *next; /*指针域*/ } main() { struct node *p; /*定义该类型的指针变量p*/ … p=(struct node *)malloc(sizeof(struct node)); /*申请分配结点存储空间*/ … free(p); /*释放结点存储空间*/ }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有