


版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、csdl306畢業(yè)考試修改版Graduatio n exam in ati onFirst, the multiple-choice questions (2 points per game, 40 points)(the following questions are A), B), C) and D) only one option is correct in the four opti on,Please fill in the correct answer in the corresponding location ofthe answer sheet, and don,t score
2、 on the test paper(1) the follow ing procedure segme nt and stateme nt k=a>b (b>c =1:0): 0; fun cti on equivale nt is 一A(A) if (a>B) and (b>C) k=l (if); B (a>B) | (b>C) k=l;Else k=0; else k=0;(C) if (a<=B) k=0; D) if (a>B) k=l;Else if (b<=C) k=l; else if (b>C) k=l;Else
3、k=0; else k=0;(2) the followi ng proceduresMain ()Char K; int I;For (i=l; i<3; i+)seanf ( c ,&k);Switch (k)ease ' O' : printf (' anothern,);Case T' : printf (' numbern,);Whe n the program is running, from the keyboard in put: 01<, en ter, and, after the impleme ntatio n
4、 of the output, the result is D(A) ano ther B) ano ther C) ano ther D) nu mberNumber nu mber nu mber nu mberNumber ano ther nu mber(3) the followi ng proceduresMain ()int, x 二 0, y 二 5, z 二 3;While (z->0&&+x 5) y 二 yT ;Printf ( d, %d, %dn ,x, y, Z);The output after the program is executed
5、 is一- B(A) 3,2,0, 3,2), -1, C) 4,3,一 1, D) 5,一 2, -5, B(4) there are defi niti ons: int, n=0, *p 二&n, *q二 &p; in thefollowi ng opti ons, the correct assig nment stateme nt is(A) p=l: B) *q=2; C) q 二 p; D) *p=5;(5) the followi ng proceduresVoid f (int, V, i nt, w)(int t;T 二 v; v 二 w; w 二 t;Ma
6、in () int, x=l, y 二 3, z=2;If (x>y) f (x, y);Else, if (y>z), f (y, Z):Else f (x, Z);Printf ( d, %d, %dn ,x, y, Z);After executi on, the output is(A) 1,2,3 B) 3, 1,2 C) 1,3,2 D) 2, 3, 1(6) have the follow ing proceduresInt, a10 = l, 2, 3, 4, 5, 6, 7, 8, 9, 10, *p=&a3, b;B=p5:The value in B
7、isA) 5, B) 6, C) 8, D) 9(7) the followi ng proceduresMain ()(char, *p10 = , ABC,"aabdfg", "dcdbe", CD"Printf ( dn After executi on, the output isA) 2, B) 3, C) 4, D) 5in the followi ng stateme nt or stateme nt group, it is possible to assig n a stri ng correctlyA) char *sp;
8、*sp 二"right"char s10; s 二"right"! C) char s10; *s 二;right; D; char; *sp 二;right! ;(9) typedef, struct, ST長人;短 S; int ; char C 2 ;新的;請計算結(jié)構(gòu)體的大?。?2 B 14 C 16 D 20(10)在一個C源程序文件中,若要定義一個只允許本源文件中所有函數(shù)使用的全局變量,則該變量的存儲類應(yīng)該是()。a. extern b? register c. auto d. static(II ) o下面不支持下標(biāo)操作的容器是A. 矢量B.
9、 deque 容器C. 列表D. 地圖(12) 個類如果沒有定義任何函數(shù),編譯器不會自動為這個類產(chǎn)生A. 拷貝構(gòu)造函數(shù)B. 無參構(gòu)造函數(shù)C. 輸岀流運(yùn)算符D. 賦值運(yùn)算符(13) 私人訪問屬性限制對象的成員可以在一中訪問。A. 本類的成員函數(shù)B. 主要函數(shù)C. 父類的成員函數(shù)D. 了類的成員函數(shù)(14) 父類和了類各自定義一個成員函數(shù),函數(shù)名相同,參數(shù)表不同A. 在了類中這兩個函數(shù)構(gòu)成重載關(guān)系B. 子類不會繼承父類的這個函數(shù)C. 了類中的函數(shù)會覆蓋父類中的函數(shù)D. 編譯時會發(fā)生錯誤(15)o如果MyClass類定義了拷貝構(gòu)造函數(shù)和一個整型參數(shù)的構(gòu)造 函數(shù),還重載了賦值運(yùn)算符,那么語句MyCla
10、ss 對象二 100;會 ;A. 調(diào)用拷貝構(gòu)造函數(shù)B. 調(diào)用整型參數(shù)的構(gòu)造函數(shù)C. 調(diào)用賦值運(yùn)算符D. 引起編譯錯誤(16) o抽象類指的是;A. 沒有任何成員的類B. 只有成員函數(shù)沒有數(shù)據(jù)成員的類C. 有虛函數(shù)的類D. 有純虛函數(shù)的類(17)多態(tài)性是通過 實(shí)現(xiàn)的。A. 構(gòu)造函數(shù)B. 析構(gòu)函數(shù)C. 虛函數(shù)D. 函數(shù)重載(18)判斷一個of stream類對象文件打開文件是否失敗,應(yīng)該判斷OA. 創(chuàng)建文件流對象時是否拋出異常 打開成員函數(shù)的返回值C. 外匯經(jīng)營資金成員函數(shù)的返回值D. !文件是否為真(19)二叉查找樹按一遍歷時訪問到節(jié)點(diǎn)的數(shù)據(jù)是排好序的。A. 前序B. 中序C. 后序D. 層次(20)如果在嘗試塊中用拋出“錯誤”語句拋岀一個異常,則參數(shù)類型是 的抓塊能夠捕獲這個異常。答:char *常量char *C.字符D. const char二問答題(每題5分)1, C+中函數(shù)的重載的定義?2o怎么理解動態(tài)綁定和靜態(tài)綁定?
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 海底撈收銀員崗位職責(zé)與操作規(guī)范他
- 幼兒園隔離與消毒落實(shí)措施
- 管網(wǎng)改造升級給水管網(wǎng)施工進(jìn)度計劃
- 道路橋梁混凝土冬季保溫措施他
- 蘇教版六年級上冊科學(xué)教案計劃
- 人音版三年級下冊音樂教學(xué)問題解決計劃
- 雙減背景下學(xué)科作業(yè)差異化設(shè)計心得體會
- 六年級下冊交通生命安全教學(xué)計劃
- 以實(shí)踐為翼筑牢小學(xué)低段數(shù)感根基
- 統(tǒng)編版四年級語文上冊教學(xué)質(zhì)量提升計劃
- 土木工程力學(xué)(本)-001-國開機(jī)考復(fù)習(xí)資料
- 【MOOC】小白學(xué)Python-南京財經(jīng)大學(xué) 中國大學(xué)慕課MOOC答案
- 工業(yè)5G專網(wǎng)構(gòu)筑新質(zhì)生產(chǎn)力發(fā)展新優(yōu)勢
- 電線電纜生產(chǎn)常見質(zhì)量問題改善與提升
- 2024-2030年中國倉庫行業(yè)面臨的機(jī)遇與挑戰(zhàn)規(guī)劃研究報告
- 生態(tài)綠化修復(fù)項(xiàng)目投標(biāo)文件(技術(shù)方案)
- “學(xué)生中心”下的化學(xué)高效教學(xué)策略
- 污水處理廠化驗(yàn)室管理
- 四川省遂寧市(2024年-2025年小學(xué)四年級語文)人教版期末考試((上下)學(xué)期)試卷及答案
- 游戲行業(yè)的數(shù)據(jù)分析和決策支持
- DL∕T 1084-2021 風(fēng)力發(fā)電場噪聲限值及測量方法
評論
0/150
提交評論