【正文】
??偨Y(jié):本次編程學(xué)習(xí)到了很多知識(shí),特別感受到了鏈表在C語言中比數(shù)組來的更加方便,雖然完成了本次實(shí)習(xí)目的,但是設(shè)計(jì)出的軟件還有很大缺陷,不是很完善,在幾個(gè)地方不是很人性化,需要改進(jìn),比如在保存文件有累贅部分,有待完善。2)編程過程中出現(xiàn)的最多問題就是運(yùn)行時(shí)總是跳出警告框提示內(nèi)存什么的,出現(xiàn)這個(gè)問題主要是寫代碼時(shí)候不嚴(yán)謹(jǐn),多處地方不能統(tǒng)一,導(dǎo)致機(jī)器運(yùn)行是容易出錯(cuò),避免這種問題要仔細(xì)查看代碼任何一處地方,所有代碼都要遵守規(guī)則;3)在編寫過程中出現(xiàn)了很多問題,現(xiàn)挑主要問題說明如下:調(diào)用函數(shù)是,子函數(shù)沒有形參,調(diào)用時(shí)卻添加了形參;定義變量時(shí)沒有注意類型,在輸入時(shí)錯(cuò)誤使用了輸入格式;一個(gè)子函數(shù)包含多一些語句時(shí),容易漏掉大括號(hào)導(dǎo)致程序檢查時(shí)主函數(shù)出現(xiàn)錯(cuò)誤;輸入的方法錯(cuò)誤導(dǎo)致運(yùn)行出錯(cuò);調(diào)用查找、修改函數(shù)不能進(jìn)入函數(shù)中,鏈表地址指向不對(duì),語句放置位子不對(duì);以上問題在老師的指導(dǎo)下,一個(gè)一個(gè)解決了,同時(shí)也給自己加深了編寫程序要注意的地方??戳藭?,最后都一一解決了。}/*endwhile*/return buf。 continue。) { size += 10。 buf[j] != 39。 } }/*endfor*/ if (i == 10 amp。\039。\n39。 i++) { buf[++j] = getchar()。while(1) { for(i = 0。size = 10。int i, j, size。return。 return。marks[j][3],amp。marks[j][1],amp。 scanf(%d,%d,%d,%d,%d,amp。,39。 }}if (found) { printf(please input %s39。 j=i。 students[i] != NULL。 name = ReadLine()。 printf(Enter Student Name to be added marks in:\n)。s reply using gets() into a character arrays of size 80.Then it uses sscanf() on that array to extract the response. Etc.for the third, fourth, and fifth.Note that both students and marks are passed to thisfunction by value,for this function does not need to modify the value stored in the pointer student.The same applies to marks.*/void EditMarks(char** students,int** marks){ int found, i, j。}}/* function EditMarks *//*This function prompts the user to enter a student namewhose marks are to be edited. The precise form of the promptis Enter Student Name whose marks are to be edited:Then this function reads the name from standard input.But it must be able to read any name of any size!! Thus you haveto allocate memory (using malloc()) to read the input into, and ifit is not big enough, must use realloc() to extend it. You are notallowed to allocate more than 10 bytes in one allocation or extendyour segment by more than 10 bytes in one call to realloc().Do not forget to deallocate the memory before exiting the function!Note that this part of the code is the same as in InsertStudent()and DeleteStudent(), so you can either copy it or write a functionthat would do it for all three.If the student is not found in the array students, a warning messagestudent xxx not in the Class List is displayed on the screen andthe function terminates. If it is found, the students name followedby : and his/her five marks are displayed (again, 1 must be shownas a space, as in ShowClass()). Let us assume that the student inquestion has marks 10,1,20,15,5Then the function displays a prompt to the user forthe first mark to leave the 1st mark 10 unchanged pressenterotherwise type the new mark and pressenter and reads the user39。students[i]!=NULL。 } } }}/* function ShowClass *//*In this function you display on the screen eachstudent in the class and his/her 5 marks on a line.If the mark is 1 display a space instead. After thename of student display : and separate