结构体与共用体 - 成都理工大学工程技术学院精品课程在线.pptVIP

  • 2
  • 0
  • 约9.99千字
  • 约 33页
  • 2016-01-05 发布于湖北
  • 举报

结构体与共用体 - 成都理工大学工程技术学院精品课程在线.ppt

链表的删除 /*参考源程序7-9*/ Struct Ai *delete(struct Ai *head,int a) {struct Ai *prev,*pdel; if (head-a==a) {head=head-next; printf(“The first node is deleted.\n”);} else {if ((prev=findprev(head,a))!=NULL) {pdel-next=pdel-next; free(p); printf(“Node(which number is %d)is deleted.\n”,a);} else printf(“Node(which number is %d)is not found.\n”,a);} return(head);} * 链表的删除 /*参考源程序7-9*/ main() { struct Ai *head,*new,*p; int n=0; int a; head=create(); printf(“Input data for the node to be deleted:\n”); scanf(“%d”,a); head=delete(head,a); printf(“Atfer the node is deleted:\

文档评论(0)

1亿VIP精品文档

相关文档