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

正文內(nèi)容

編程實習報告09061109-楊宇超(已改無錯字)

2022-08-31 07:35:58 本頁面
  

【正文】 is not in the class list yet */else{ printf(student %s not in the class list\n,namex)。 return。}}/* function SortClass *//*In this function you sort the strings in the array students alphabetically(lexicographically) using a simple bubble sort and the parison functionfor strings strcmp(). Do not forget that as you are changing the order ofstrings in students, you must be changing the order of rows in the arry marks.Note, that when sorting the array students, and when you want to switchith stringwith the (i+1)ststring, all you have to do is switch the pointers, you do nothave to touch the strings themselves.Note that both students and marks are passed to thisfunction by value, for this function does not need to modify thevalue stored in the pointer student. The same applies to marks.*/void SortClass(char** students,int** marks){ int i,j。 int* temp1。 char* temp。 for(j=0。students[j]!=NULL。j++) { for(i=j。students[i+1]!=NULL。i++) { if ((strcmp(students[i],students[i+1]))=0) { temp=students[i]。 students[i]=students[i+1]。 students[i+1]=temp。 temp1=marks[i]。 marks[i]=marks[i+1]。 marks[i+1]=temp1。 } } }}/* 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 the marks by ,Note that both students and marks are passed to thisfunction by value, for this function does not need to modify thevalue stored in the pointer student. The same applies to marks.*/void ShowClass(char** students,int** marks){ int i。 for(i=0。students[i]!=NULL。i++){ printf(%s,%d,%d,%d,%d,%d\n,students[i],marks[i][0],marks[i][1],marks[i][2],marks[i][3],marks[i][4])。}}/* 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 term
點擊復制文檔內(nèi)容
環(huán)評公示相關推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1