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

正文內(nèi)容

[工程科技]強化復習之常用算法-資料下載頁

2025-01-19 08:38本頁面
  

【正文】 ]=?z?))testword( )。 else i++。 for(i=f。i=n。i++)putchar(a[i])。 putchar(?\n?)。 } 最長串:改錯 include “” main( ) { int i, maxlen,len。 char inline[10][100],maxline[100]。 FILE *fp。 if(fp = =fopen(“”,”ow”))= =NULL) EXIT(1)。 for(i=0。i10。i++) {gets(inline[i])。 fprintf(fp,”%s\n”,inline[i])。} 最長串:改錯 maxlen=0。 for(i=0。i10。i++) {strlenth(inline[i],len)。 if(lenmaxlen) strcpy(maxline,inline[i]),maxlen=len。} fprintf(fp,”max string is:%s\n maclen=%d\n”,maxline,maxlen)。 fclose(fp)。} strlenth(charp。 int len) { len=0。 while(p[len]!=?\0?) ++len。} 鏈表的建立 建立鏈表(返回鏈表頭指針,當鏈表的值域為 999時,建立鏈表過程結(jié)束) 輸出變量: h指向鏈表頭。 輸入變量: q指向新分配結(jié)點。 輔助變量: p指向鏈表尾。 主要思路: (1)pnext=q。 (2)p=q。 (3)scanf(“%d”,amp。pdata)。 (4)q=(struct student *)malloc(sizeof(struct student))。 10 20 30 h p q 10 20 30 h q p 10 20 30 h p q 40 10 20 30 h p 40 q 說明:( 1)主函數(shù)改為子函數(shù)(返回鏈表頭指針) struct student *creat() {…… …… return( h): } ( 2)用 typedef struct student; {…… }REC; 可把 q=(struct student *)malloc(sizeof(struct student))。 縮寫為: q=( REC *) malloc( sizeof( REC)); ( 3)新分配的結(jié)點是不是尾結(jié)點是人為規(guī)定的。 鏈表的插入 輸入變量: h指向鏈表頭 ,m待插結(jié)點的后繼結(jié)點數(shù)據(jù)。 輸出變量: h。 中間變量: p指向當前結(jié)點; q指向 p的后繼結(jié)點; r指向待插結(jié)點; 主要思路: 當 p指向待插結(jié)點的后繼結(jié)點 (pdata= =m), 則 (1)qnext=r。 (2)rnext=p( 2)釋放 p、 q和 r; 否則( 1) q=p; ( 2) p=qnext。 直到 p=NULL q p r
點擊復制文檔內(nèi)容
教學課件相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1