青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

李帥的博客

軟件開發愛好者

  C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
  14 隨筆 :: 3 文章 :: 4 評論 :: 0 Trackbacks
9. Which of the following statements provide a valid reason NOT to use RTTI for distributed (i.e. networked between different platforms) applications in C++?
A. RTTI is too slow.
B. RTTI does not have standardized run-time behavior.
C. RTTI uses too much memory.
D. RTTI's performance is unpredictable/non-deterministic.
E. RTTI frequently fails to function correctly at run-time

11. A C++ developer wants to handle a static_cast <char*>() operation for the class String shown below. Which of the following options are valid declarations that will accomplish this task?
class String {
public:
  //...
  //declaration goes here
};
A. char* operator char*();
B. operator char*();
C. char* operator();
D. String operator char*();
E. char* operator String();


16. When a Copy Constructor is not written for a class, the C++ compiler generates one. Which of the following statements correctly describe the actions of this compiler-generated Copy Constructor when invoked?
A. The compiler-generated Copy Constructor makes the object being constructed, a reference to the object passed to it as an argument.
B. The compiler-generated Copy Constructor does not do anything by default.
C. The compiler-generated Copy Constructor performs a member-wise copy of the object passed to it as an argument, into the object being constructed.
D. The compiler-generated Copy Constructor tags the object as having been Copy-Constructed by the compiler.
E. The compiler-generated Copy Constructor invokes the assignment operator of the class.

17. Which of the following must be ensured in order to implement a polymorphic function in C++?
A.        There has to be a pointer of the derived class that has implemented the polymorphic function that holds the address of the derived class object.
B.        The function must be declared as virtual in both the base class and in the derived class that overrides the function.
C.        The function must be declared as pure virtual.
D.        There has to be a base class pointer holding the address of a base or derived class object that has implemented the polymorphic function.
E.        The function must be declared as virtual in the base class.

18. Protected, or private, inheritance, as opposed to public inheritance, models which type of relationship in C++?
A.        Can-only-have-one-of
B.        Is-implemented-in-terms-of
C.        Was-a
D.        Has-a
E.        Shares-a-relationship-with

19. Which of the following statements describe correct methods of handling C++ exceptions?
A.        Once an exception is thrown, the compiler unwinds the heap, freeing any memory dynamically allocated within the block from which the exception was thrown.
B.        In a hierarchy of exception classes, the order of handling exceptions can be from the most specific class to the most general class.
C.        Catching an exception by reference is preferable to catching it by value.
D.        If an exception is caught by its address or pointer, it is the responsibility of the thrower to release the memory occupied by the exception.
E.        To write an exception handler, it is essential to know the concrete class of exception to catch.

20. Which of the following statements regarding functions' default arguments in C++ are correct?
A.        Default arguments cannot be of a user-defined type.
B.        Default arguments exist in the global heap and not on the function's stack.
C.        Default arguments cannot be of pointer type.
D.        Default arguments can never precede non-default arguments.
E.        Default arguments are not considered for generating the function's signature.

21. Which of the following classes must be instantiated so that the object can be used both for reading and writing to the same file in C++?
A.        ofstream
B.        stream
C.        ifstream
D.        fstream
E.        iostream

22.  Which of the following reasons describe why a destructor cannot throw an exception in C++?
A.        Since the object is being destroyed, it is illogical to throw an exception then.
B.        A destructor may be invoked as a result of stack unwinding while an exception is being handled.
C.        It can invoke the terminate() handler.
D.        The C++ language does not permit it; a throw statement in a destructor will be caught as an error by the compiler.
E.        A destructor in C++ cannot implement a try...catch block

24. Which of the following identify const-correctness failures in the C++ program below?
template<typename T>
class MyArray
{
public:
    MyArray();
    MyArray(MyArray& copy);
    MyArray& operator=(MyArray& copy);
    //...

};

class MyData
{
public:
    MyData(MyArray<int>& x, MyArray<int>& y);
    //...

    const MyArray<int>& x();
    const MyArray<int>& y();
};

MyArray<int> read_data(int*, char**);
void make_changes(MyData* edit);

int main(int argc, char* argv[])
{
    const MyArray<int> read_x = read_data(&argc, argv);
    const MyArray<int> read_y = read_data(&argc, argv);
     
    MyData user_data(read_x, read_y);
    MyData edit_buffer(user_data);
    make_changes(&edit_buffer);
}

A.        MyData(MyArray<int>& x, MyArray<int>& y); should be
MyData(const MyArray<int>& x, const MyArray<int>& y);

B.        MyArray(MyArray& copy); should be
MyArray(const MyArray& copy);

C.        MyArray& operator=(MyArray& copy); should be
const MyArray& operator=(const MyArray& copy);

D.        void make_changes(MyData* edit); should be
void make_changes(const MyData* edit);

E.        const MyArray& operator=(const MyArray& copy); should be
const MyArray& operator=(const MyArray& copy) const;

25. Which of the following operators must be overloaded by function objects in the Standard Template Library?
A.        operator +()
B.        operator ==()
C.        operator ++()
D.        operator ()()
E.        operator []()

======================================================

附上我的選擇和疑問,歡迎大家指正和討論:

9. AD (not quite sure)
11. A (What does this question mean?! Can anyone explain it? )
16. AC  (Is A right?! Should it be 'a CONST reference to the object passed to it as an argument')
17. E (not quite sure. Is A or D right too? )
18. A or E. I have no idea at all!!!!
19 C (Is B right too?)
20. only D?
21. DE
22. BC ?
24. only B ?
25. D
posted on 2008-11-07 21:37 李帥 閱讀(1372) 評論(1)  編輯 收藏 引用

評論

# re: 幾道C++筆試題,不定項選擇,請高手解答分析,歡迎討論。 2011-09-21 17:55 臭美街
[url=http://www.choumeijie.com/]臭美街[/url]  回復  更多評論
  


只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            亚洲成色精品| 欧美日韩在线视频首页| 亚洲第一在线综合网站| 另类春色校园亚洲| 欧美福利视频网站| 欧美激情一区二区三区在线视频| 国内精品久久久久影院色| 国产欧美亚洲一区| 国产精品一区久久久| 国产主播精品在线| 在线观看福利一区| 亚洲美女黄网| 小嫩嫩精品导航| 欧美中文日韩| 欧美电影打屁股sp| 一区二区三区毛片| 欧美在线播放视频| 免费日韩视频| 国产精品久久久久久久9999| 国产日韩精品视频一区| 亚洲免费在线观看视频| 香蕉久久夜色| 欧美激情乱人伦| 国产精品久久久久久久久搜平片| 欧美日韩在线精品一区二区三区| 国产精品久久久久久久久免费| 国产精品午夜国产小视频| 伊人色综合久久天天五月婷| 9人人澡人人爽人人精品| 久久久亚洲国产天美传媒修理工 | 国产区欧美区日韩区| 黄色成人片子| 亚洲视频一区二区在线观看| 久久婷婷国产麻豆91天堂| 亚洲乱码国产乱码精品精 | 亚洲经典三级| 亚洲影院免费观看| 欧美国内亚洲| 国产原创一区二区| 午夜精品久久久久| 亚洲国产精彩中文乱码av在线播放| 亚洲青色在线| 久久婷婷久久| 久久一区二区三区四区五区| 中文欧美日韩| 欧美成人免费视频| 亚洲黄页视频免费观看| 欧美亚洲日本国产| 亚洲精品老司机| 久久久久久久综合色一本| 欧美三区不卡| 日韩系列在线| 亚洲大胆女人| 久久综合九色99| 国产综合久久久久久| 欧美在线播放一区| 亚洲欧美日韩一区在线观看| 欧美大片18| 亚洲国产精品久久久久秋霞不卡| 99国产精品自拍| 亚洲看片免费| 国产丝袜美腿一区二区三区| 久久嫩草精品久久久久| 欧美影院成人| 一区二区三区毛片| 欧美日韩亚洲成人| 一区二区三区欧美日韩| 欧美日韩免费观看一区二区三区| 国产亚洲一二三区| 亚洲午夜极品| 亚洲天堂av在线免费| 国产精品福利在线| 午夜精品福利在线| 午夜视频一区二区| 狠狠做深爱婷婷久久综合一区| 亚洲二区视频在线| 欧美影视一区| 国产精品天天摸av网| 亚洲三级影片| 在线视频亚洲| 国产精品资源在线观看| 久久国产精品亚洲va麻豆| 久久爱www久久做| 亚洲国产中文字幕在线观看| 91久久精品美女高潮| 欧美日韩黄视频| 欧美在线观看你懂的| 久久五月婷婷丁香社区| 日韩亚洲欧美成人一区| 一本色道久久综合狠狠躁篇怎么玩| 欧美精品97| 久久国产天堂福利天堂| 欧美成人国产va精品日本一级| 亚洲欧洲一区二区在线播放| 老鸭窝亚洲一区二区三区| 欧美精品七区| 亚洲毛片播放| 欧美日韩国产大片| 亚洲性视频网址| 久久久免费av| 亚洲一区二区三区精品动漫| 欧美影片第一页| 99热免费精品在线观看| 欧美伊人久久久久久久久影院| 国产精自产拍久久久久久| 欧美高清一区二区| 国产精品视区| 亚洲国产精品久久| 国产亚洲欧洲一区高清在线观看| 久久综合久色欧美综合狠狠| 欧美日韩不卡合集视频| 久久亚洲精选| 亚洲国产精品一区在线观看不卡| 国产一区二区三区免费在线观看 | 欧美视频一区二区三区| 久久精品视频一| 欧美丝袜第一区| 欧美肥婆在线| 国产综合激情| 国产欧美精品国产国产专区| 亚洲少妇最新在线视频| 欧美黄色视屏| 黑人巨大精品欧美一区二区小视频 | 国产精品美女久久久久久2018 | 亚洲国产成人精品女人久久久| 欧美极品欧美精品欧美视频| 久久综合久色欧美综合狠狠| 国产欧美日韩一级| 这里只有精品电影| 夜夜嗨av一区二区三区四季av | 欧美激情一区二区在线| 欧美成人亚洲| 在线观看欧美视频| 久久精品国亚洲| 久久久久久久高潮| 国产精品自拍在线| 亚洲一区国产一区| 亚洲免费视频中文字幕| 欧美性猛交xxxx乱大交蜜桃| 亚洲精品永久免费| 亚洲一区二区四区| 国产精品亚洲综合一区在线观看| 亚洲激情小视频| 日韩午夜av| 欧美日韩国产在线看| 亚洲精品一线二线三线无人区| 在线观看不卡av| 久久综合网络一区二区| 欧美激情视频一区二区三区免费| 一区二区三区无毛| 麻豆成人av| 亚洲精品欧美专区| 亚洲性xxxx| 国产老女人精品毛片久久| 欧美亚洲色图校园春色| 欧美成人一区二区三区在线观看| 亚洲二区免费| 欧美极品一区| 小嫩嫩精品导航| 欧美激情一区二区三区在线| 亚洲精品专区| 国产精品卡一卡二卡三| 久久精品91久久久久久再现| 欧美激情精品久久久久| 亚洲香蕉在线观看| 国产一区二区在线观看免费| 欧美成人有码| 亚洲欧美日韩一区在线| 欧美成人免费全部观看天天性色| 亚洲国产网站| 欧美午夜欧美| 久久久亚洲人| 9国产精品视频| 久久影院亚洲| 亚洲在线一区| 在线观看成人小视频| 国产精品麻豆va在线播放| 裸体女人亚洲精品一区| 亚洲无限av看| 亚洲电影在线| 久久久精品日韩| 亚洲婷婷在线| 亚洲国产欧洲综合997久久| 亚洲欧美制服另类日韩| 欧美成人精品在线视频| 亚洲欧美中文另类| 亚洲国产精品ⅴa在线观看| 国产精品免费看片| 欧美日本一道本在线视频| 久久av在线| 亚洲一区制服诱惑| 亚洲精品一区二区三区福利| 久久久久久亚洲精品不卡4k岛国| 亚洲电影免费在线观看| 国产欧美日韩视频一区二区三区 | 一区二区高清在线| 欧美成在线观看| 久久日韩粉嫩一区二区三区| 亚洲男人影院| 亚洲校园激情|