【正文】
nf(line,%d,amp。int menu。exit(1)。void ShowClass(char** students,int** marks)。 顯示所有學(xué)生信息基本想法:直接用printf 輸出,void EditMarks(char** students,int** marks)。若不是,則用一個(gè)while 將后面的所有學(xué)生向前移一位 直到NULL,再釋放最后的內(nèi)存,最后再釋放學(xué)生姓名的那個(gè)內(nèi)存void SortClass(char** students,int** marks)。插入學(xué)生姓名 基本想法:先讀取學(xué)生姓名,判斷指針是否為空,為空則建立內(nèi)存。void SortClass(char** students,int** marks)。 編 程 實(shí) 習(xí) 報(bào) 告 (2009屆)題 目: 用字符串指針實(shí)現(xiàn)學(xué)生成績(jī)管理系統(tǒng)姓 名: 楊宇超 學(xué) 號(hào): 09061109 學(xué) 院: 自動(dòng)化學(xué)院 班 級(jí): 09063011 指導(dǎo)教師: 席旭剛 高云園2022年8月20日 2011年7月5日摘要:本文介紹運(yùn)用C語(yǔ)言中單用字符串指針實(shí)現(xiàn)一個(gè)學(xué)生信息管理工具軟件,主要功能有:add、show、sort、Delete。完成函數(shù)void DeleteStudent(char*** students,int*** marks)。二、詳細(xì)設(shè)計(jì)(分析各函數(shù)的功能,設(shè)計(jì)各函數(shù)的處理過(guò)程及其流程圖)void InsertStudent(char*** students,int*** marks)。刪除學(xué)生信息基本想法:先讀取要?jiǎng)h除的學(xué)生姓名,將讀入的學(xué)生姓名與已存在的學(xué)生進(jìn)行比較,如相同,記住該學(xué)生所在位置,判斷該學(xué)生下一個(gè)是否為空,若為空,就可以直接把該學(xué)生內(nèi)存釋放掉。void ShowClass(char** students,int** marks)。void SortClass(char** students,int** marks)。define merror(a) {printf(memory allocation error %d\n,a)。char line[100]。gets(line)。}if (menu 1 || menu 5){ printf(incorrect selection)。marks)。else if (menu == 3) ShowClass(students,marks)。//read here}/*end main*//* function InsertStudent *//*This function prompts the user to enter a new student name.The precise form of the prompt is Enter Student Name to be added to Class List: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 orextend your segment by more than 10 bytes in one call to realloc().Do not forget to deallocate the memory before exiting the function!Once the function has the name to be entered, it traverses the array studentto find out if the name is already there. If so, the function displaysa warning message student xxx already in the class list and terminates (where xxx is the name of the student). If the name is not in the array, thearray students is extended by one item (using realloc()) and a copyof the string with the name is placed there. Also the array marks isextended by one row (using realloc()) and all five marks in that row are set to 1. Then updated arrays students and marks are passed to SortClass()so they can be sorted alphabetically, as you are required to keep the classlist and the list of marks in alphabetical order.Note that both students and marks are passed to this function by reference,for this function on occasions must be able to modify the value stored in thepointer student (in main()) when putting there the very first student or whenrealloc() possibly moves the array in the memory somewhere else. The same appliesto marks.*/void InsertStudent(char*** students,int*** marks){i