c语言中p=malloc(sizeof(struct node))是什么意?
c语言中p=malloc(sizeof(struct node))是什么意思
p指针指向新开的space,大小是struct node这么大。
int *p 申明一个int型指针p p=(struct node *)malloc(sizeof(struct node)); 将P指向一个新分配的struct node型指针地址 (struct node *)表示强制转换成 struct node型指针,struct node是之前声明过的一个结构体,你查一下代码就可以看到定义
答:应该是第37集吧,希望能够帮助您!详情>>
问:挺简单的一C函数,不过我是初学者,暂时还不会写,请好心人多多帮忙!
答:int mystrlen(char *str) { int n = 0; while (*str) { n++; str++;} return n; } voi...详情>>