C语言PPT(标准)-结构体.pptVIP

  • 29
  • 0
  • 约3.39万字
  • 约 82页
  • 2019-07-18 发布于山东
  • 举报
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 注意输入的数字的格式是f 是d 一定要一致 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 每次创建结点就给该结点的所有成员赋值。 struct student *create(int n) { struct student *head,*pnew,*ptail; int i; pnew=(struct student *)malloc(sizeof(struct student)); scanf(%s%f,pnew-name,pnew-score); pnew-next=NULL; head=pnew; ptail=pnew; //建首元节点 for(i=1;in;i++) // 建剩余的n-1个节点 { pnew=(struct student *)malloc(sizeof(struct student)); scanf(%s%f,pnew-name,pnew-score); pnew-next=NU

文档评论(0)

1亿VIP精品文档

相关文档