malloc()这是什么函数啊??

来源:百度知道 编辑:UC知道 时间:2024/05/15 10:27:27
student=(struct stu*)malloc(sizof(struct stu));//什么叫为指针分配安全地址???

什么是指针知道吧,指针是需要分配地址的,也就是它指向什么,否则要指针干什么呢?
malloc就是为指针分配空间的,sizof(struct stu));是计算为这个指针分配多少空间,struct stu*是是分配的类型,而安全地址就是确保这个地址可用