freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

數(shù)據(jù)結(jié)構(gòu)課程設(shè)計(jì)報(bào)告--鏈表(編輯修改稿)

2025-04-19 08:49 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 ruct student *head。struct student *p1,*p2。n=0。p1=p2=(struct student *)malloc(LEN)。 /*開(kāi)辟一個(gè)新單元*/scanf(%d,%d,amp。p1num,amp。p1score)。head=NULL。while(p1num!=0) { n=n+1。 if(n==1)head=p1。 else p2next=p1。 /*把p1所指的結(jié)點(diǎn)連接在p2所指的結(jié)點(diǎn)后面*/ p2=p1。 p1=(struct student*)malloc(LEN)。 scanf(%d,%d,amp。p1num,amp。p1score)。}p2next=NULL。return(head)。 /*函數(shù)返回head的值,即鏈表中第一個(gè)節(jié)點(diǎn)的起始地址*/}void print(struct student*head){struct student*p。printf(\nNow,these %d records are:\n,n)。p=head。if(head!=NULL) do { printf(%d %d\n,pnum,pscore)。 p=pnext。 }while(p!=NULL)。}struct student*del(struct student*head,int num){struct student*p1,*p2。if(head==NULL) {printf(\nlist null! \n)。 return head。 }p1=head。while(num!=p1num amp。amp。 p1next!=NULL) /*p1指向的不是所要找的節(jié)點(diǎn),且后有節(jié)點(diǎn)*/ { p2=p1。 p1=p1next。 } /*p1后移一個(gè)節(jié)點(diǎn)*/if(num==p1num) /*找到了*/ { if(p1==head)head=p1next。 /*若p1指向的首節(jié)點(diǎn),把第二個(gè)節(jié)點(diǎn)地址賦予head*/ else p2next=p1n
點(diǎn)擊復(fù)制文檔內(nèi)容
電大資料相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1