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

正文內(nèi)容

[教育學]軟件工程c上機實驗指導(dǎo)書修訂(參考版)

2024-10-17 08:40本頁面
  

【正文】
。 軟件設(shè)計基礎(chǔ)實驗指導(dǎo)書 53 puts( * O = Load records from a file *)。 puts( * H = Show this help message *)。 puts( * I = Insert records *)。 puts( * D = Delete a record seleced by number *)。 puts( *********************************************)。 } void Help() { puts( *********************************************)。 } stulink = NULL。 stu = stulink。 } puts(Loading ...)。 if((fileLoad = fopen(filename, rb)) == 0) 軟件設(shè)計基礎(chǔ)實驗指導(dǎo)書 52 { printf(Cannot open file %s !\n, filename)。 printf(Please input the filename you want load from: )。 free(temp)。 while(stulink) { temp = stulink。 FILE * fileLoad。 } puts(Saveing is finished!)。 while(stu) { fwrite(stu, sizeof(struct SStudent), 1, fileSave)。 } puts(Saveing ...)。 if((fileSave = fopen(filename, wb)) == 0) 軟件設(shè)計基礎(chǔ)實驗指導(dǎo)書 51 { printf(Cannot open file %s !\n, filename)。 printf(Please input the filename you want save in: )。 } } void Save(struct SStudent * stu) { unsigned char filename[13]。 } else next = nextlink。 flag = 0。 templink = nextlink。 while(nextlink != lastlink) { if(nextlinknumber lastlinknumber) { temp = lastlink。 while(lastlink) { next = stu。 軟件設(shè)計基礎(chǔ)實驗指導(dǎo)書 50 int flag。 stu = stulink。 printf(%4d\t, stuscore2)。 printf(%10s\t, stuname)。 } printf(number\tname\t\tscore1\tscore2\tscore3\n)。 if(!stu) { puts(The table is EMPTY!)。 } else next = nextlink。 nextlink = nextlinklink。 next = stu。number)。 } printf(\nPlease input the number (0 to quit): )。 break。 while(lastlink) { if(lastlinknumber nextnumber) { nextlink = lastlink。nextscore3)。 printf(Please input the third score: )。 軟件設(shè)計基礎(chǔ)實驗指導(dǎo)書 48 scanf(%d, amp。nextscore1)。 printf(Please input the first score: )。 printf(Please input name: )。 while(number) { next = (struct SStudent *) malloc(sizeof(struct SStudent))。 scanf(%d, amp。 int number。 } lastlink = NULL。 scanf(%d, amp。 last = lastlink。nextscore3)。 printf(Please input the third score: )。 scanf(%d, amp。nextscore1)。 軟件設(shè)計基礎(chǔ)實驗指導(dǎo)書 47 printf(Please input the first score: )。 printf(Please input name: )。 while(number) { next = (struct SStudent *) malloc(sizeof(struct SStudent))。 scanf(%d, amp。 while(lastlink) last = lastlink。 int number。 return(stu)。\039。 stuscore1 = stuscore2 = stuscore3 = 0。 stu = (struct SStudent *) malloc(sizeof(struct SStudent))。 } 軟件設(shè)計基礎(chǔ)實驗指導(dǎo)書 46 printf(\n= )。 break。H39。h39。 break。C39。c39。 break。O39。o39。 break。V39。v39。 break。: SortTable(student)。: case 39。 case 39。: InsertToTable(student)。: case 39。 case 39。: AppendToTable(student)。: case 39。 case 39。 QueryTable(student, number)。 scanf(%d, amp。D39。d39。 break。L39。l39。 keyValue != 27) 軟件設(shè)計基礎(chǔ)實驗指導(dǎo)書 45 { puts()。 amp。 keyValue != 39。 amp。 while((keyValue = getche()) != 39。 Help()。 student = CreateTable()。 unsigned number。 void Help()。 void Save(struct SStudent * stu)。 void SortTable(struct SStudent * stu)。 void InsertToTable(struct SStudent * stu)。 struct SStudent * CreateTable()。 struct SStudent * link。 char name[11]。 要求: ( A)計算平均成績; ( B)要實現(xiàn)插入功能; ( C)要有排序功能; ( D)要有存取功能。 建立一個鏈表,每個結(jié)點包括學號、姓名、及三科成績、平均成績。編寫程序統(tǒng)計學生的人數(shù)、平均年齡、平均身高。輸入的信息以文本文件格式保存,文件名通過命令行參數(shù)給出;學生信息各個信息項之間用制表符隔開,每個學生 信息占一行?,F(xiàn)分別編寫以下程序?qū)崿F(xiàn)對學生信息的處理。 理解鏈表的概念及應(yīng)用。 六、實驗報告 1.提交源程序 軟件設(shè)計基礎(chǔ)實驗指導(dǎo)書 42 2.分析以下兩個問題: ( 1) 緩沖文件系統(tǒng)和非緩沖文件系統(tǒng)的區(qū)別? ( 2) 文件打開和關(guān)閉的含義?為什么要打開和關(guān)閉文件? 實驗 12 綜合應(yīng)用實驗 一、實驗?zāi)康呐c內(nèi)容 掌握用 C 語言 進行簡單的數(shù)據(jù)庫管理。 * 存儲文件 :從鍵盤輸入若干行文本,直到輸入字符串 ”END”位置,將其中包含英文字母的行,送到文件 中存儲起來,并顯示 中的最后 5行(不足 5 行的以實際行數(shù)為準)。 * TYPE 命令模擬 : 在 windows 的 MSDOS 方式下有一個 DOS 內(nèi)部命令 TYPE,用于顯示文本文件的內(nèi)容,其命令使用格式為: TYPE FILE。 return 0。 cout “ aS[i]” endl。 i19。 cout “ i sin(i)”endl。 } ((unsigned char*)s,sizeof s)。 if(!in) { cout “ Cannot open file.”endl。 int i, a。 } 把實驗題 5所建立的文件的內(nèi)容讀出并打印。 ( )。 } ((unsigned char*)amp。 i++) { a+=5。 } for(i=0,a=5。 if(!out) { cout” Cannot open file.”endl。 int i, a。的正弦值。 建立一個磁盤文件,其內(nèi)容是 0~ 90176。 已有兩個文本文件,今要求編程序從這兩個文件中讀出各行字符,逐個比較這兩個文件中相應(yīng)的行和列上的字符,如果遇到互不相同的字符,輸出它是第幾行第幾列的字符。磁盤文件名為。 軟件設(shè)計基礎(chǔ)實驗指導(dǎo)書 39 實驗 11 文 件 一、實驗?zāi)康募皟?nèi)容 掌握文件以及緩沖文件系統(tǒng)、文件指針的概念; 學會使用文件打開、關(guān)閉、讀、寫文件操作函數(shù); 學會用緩沖文件系統(tǒng)對文件進行簡單的操作。 設(shè)計一個函數(shù),使給出一個 數(shù)的原碼,能得到該數(shù)的補碼。 編寫一程序,檢查所用的計算機系統(tǒng)的 C 編譯在執(zhí)行右移時是按照邏輯右移的原則,還是按照算術(shù)右移的原則進行操作。 將一個整數(shù) i 的各位循環(huán)左移 4 位,設(shè) i 的值為十六進制數(shù) 65。 編一個程序,止將一個整數(shù)的低 4 位翻轉(zhuǎn)。 二、實驗性質(zhì) 驗證性實驗 三、實驗學時 2 學時 四、實驗環(huán)境 Turbo C 五、實驗原理與步驟 編一個程序,將一個整數(shù) 的高字節(jié)和低字節(jié)分別輸出(用位運算方法)。 七、實驗報告 1. 提交源程序 2. 分析在上機過程中遇到的問題及解決方法。 你有無辦法測試構(gòu)造 鏈表時,內(nèi)存空間的動態(tài)分配情形 ? *現(xiàn)有一個班有 30 個學生,每個學生信息包括姓名、學號、以及期末總成績。要求刪除職工號為 103 的結(jié)點。寫一函數(shù) insert 來插入新結(jié)點。 5個職工號為 101, 103, 105,107, 109。用 malloc 打印出來。 練習一個使用共用體的程序。建立一個鏈表,每個結(jié)點包括:學號、姓名、性別、年齡。凡報到 3者退出圈子,找出最后留在圈子中的人原來的序號。 二、實驗內(nèi)容 編程序并上機調(diào)試運行: 由 10 個學生,每個學生的數(shù)據(jù)包括學號、姓名、 3 門課的成績,從鍵盤輸入 10 個學生數(shù)據(jù),要求打印出 3 門課總平均成績,以及最高分的學生的數(shù)據(jù)。 六、實驗報告 1.提交源程序 2.分析:數(shù)組與指針的聯(lián)系。 * 報數(shù)問題 有 n個人圍成一圈,順序編號。 } printf(%d,%d\n,*pt1,*pt2)。b。a。b)。 scanf(%d,%d,amp。 *p2 = iTemp。 iTemp = *p1。 } 假設(shè)該程序的文件名為 ,編譯后可執(zhí)行程序名為 (用DOS 時),在 dos 下運行時,輸入下面命令行: BASIC C++ COBOL PASCL分析輸出結(jié)果。 } int fun4(int x,int y) { 軟件設(shè)計基礎(chǔ)實驗指導(dǎo)書 34 return(x/y)。 } int fun2(int x,int y) { return(xy)。 } int *execute(int x, int y, int *fun()) { return (*
點擊復(fù)制文檔內(nèi)容
高考資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1