【正文】
\*報(bào)錯(cuò)功能*\ } while(p==NULL)。 p=q。 } else if(a==2) { for(p=q。p!=NULL。p=pnext) { if(pscore_160) printf(%s39。s lesson 1 is failed and the score is %d\n,pname,pscore_1)。 if(pscore_260) printf(%s39。s lesson 2 is failed and the score is %d\n,pname,pscore_2)。 if(pscore_360) printf(%s39。s lesson 3 is failed and the score is %d\n,pname,pscore_3)。 } p=q。 } else if(a==3) { int c。 printf(Please input the number of class:\n)。 scanf(%d,amp。c)。 \*輸入你想要輸出成績(jī)的班級(jí)*\ printf(The %d class have these student:\n,c)。 for(p=q。p!=NULL。p=pnext) if(c==pclass) printf(%10s,pname)。 printf(\n)。 p=q。 } } if(i==4) { int b。 printf(Please input which class:\n)。 \*輸入你想要輸出成績(jī)的班級(jí)*\ scanf(%d,amp。b)。 printf(Now,the score of the student of %d class is:\n,b)。 printf(Name Score_1 Score_2 Score_3\n)。 for(p=q。p!=NULL。p=pnext) if(b==pclass) printf(%12s%12d%12d%12d\n,pname,pscore_1,pscore_2,pscore_3)。 } 輸出成績(jī) PRINT。 printf(Do you want to going on?\n)。 \*是否想要繼續(xù)操作*\ printf( 1:YES 2:NO \n)。 scanf(%d,amp。m)。 } while(m!=2)。}五、調(diào)試分析過(guò)程描述運(yùn)行情況如下:輸入學(xué)生的基本信息:修改指定學(xué)生的成績(jī):統(tǒng)計(jì)并排序一班成績(jī):統(tǒng)計(jì)并排序二班的成績(jī):查詢指定學(xué)生的成績(jī):查詢學(xué)生不及格的成績(jī):查詢班級(jí)成員:輸出一班的成績(jī):輸出二班的成績(jī):調(diào)試過(guò)程中的主要問(wèn)題及解決方法:執(zhí)行排序函數(shù)時(shí)出錯(cuò),指針指向不確定。編譯時(shí)無(wú)出錯(cuò)警告,連接時(shí)出現(xiàn)錯(cuò)誤。表格輸出時(shí),格式不能對(duì)齊。未運(yùn)用格式控制字符。六、課程設(shè)計(jì)小結(jié)通過(guò)這次課程設(shè)計(jì),我對(duì)C語(yǔ)言有了更深刻的了解,增強(qiáng)了程序的編寫(xiě)能力,鞏固了專(zhuān)業(yè)知識(shí),對(duì)程序的模塊化觀念也又模糊逐漸變的清晰了。在程序的運(yùn)行與調(diào)試過(guò)程中出現(xiàn)了很多錯(cuò)誤,通過(guò)反復(fù)地復(fù)習(xí)課本上的相關(guān)知識(shí),不停地修改與調(diào)試,我終于完成了這段程序。在調(diào)試過(guò)程中,我認(rèn)識(shí)到了C語(yǔ)言的靈活性與嚴(yán)謹(jǐn)性,同一個(gè)功能可以由不同的語(yǔ)句來(lái)實(shí)現(xiàn),但編寫(xiě)程序時(shí)要特別注意細(xì)節(jié)方面的問(wèn)題,因?yàn)橐粋€(gè)小小的疏忽就能導(dǎo)致整個(gè)程序不能運(yùn)行。當(dāng)然我也認(rèn)識(shí)到了自己的薄弱之處,如對(duì)鏈表相關(guān)知識(shí)的欠缺,文件運(yùn)用的不熟練,在以后的學(xué)習(xí)中我要集中精力、端正態(tài)度,爭(zhēng)取把知識(shí)學(xué)得更扎實(shí)、更全面。 14