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

李帥的博客

軟件開發(fā)愛好者

  C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
  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 李帥 閱讀(1370) 評論(1)  編輯 收藏 引用

評論

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

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            亚洲欧美国产一区二区三区| 亚洲精选国产| 久久九九电影| 亚洲国产精品成人综合| 欧美国产日韩一区二区三区| 欧美久久久久久| 亚洲视频一区二区免费在线观看| 99在线精品视频| 国产日韩欧美日韩| 免费久久精品视频| 欧美精品偷拍| 久久精品视频在线免费观看| 美女黄毛**国产精品啪啪| 日韩午夜电影| 午夜精品久久一牛影视| 亚洲国产另类精品专区| 9色精品在线| 激情综合色综合久久综合| 亚洲区一区二区三区| 欧美日韩成人综合在线一区二区| 亚洲天堂av综合网| 亚洲影院色无极综合| 欧美手机在线视频| 久久国产精品久久久久久久久久 | 久久精品日产第一区二区三区| 欧美一区二区在线免费播放| 精品白丝av| 亚洲精品色图| 国产午夜一区二区三区| 欧美1区免费| 欧美日韩一二区| 午夜免费在线观看精品视频| 久久久久国产精品人| av不卡免费看| 欧美亚洲综合久久| 亚洲精品少妇网址| 亚洲综合日韩在线| 亚洲人成网站影音先锋播放| 亚洲一区二区精品在线| 亚洲福利视频在线| 亚洲另类在线视频| 国产欧美高清| 欧美国产在线观看| 国产精品视频xxx| 欧美超级免费视 在线| 国产精品国产a级| 欧美电影免费观看高清完整版| 欧美区视频在线观看| 老鸭窝91久久精品色噜噜导演| 欧美视频专区一二在线观看| 美女日韩在线中文字幕| 国产精品视频免费在线观看| 亚洲第一黄网| 国内精品美女av在线播放| 99国产精品久久久久老师| 亚洲高清视频在线| 亚洲欧美视频一区| 亚洲一区二区三区激情| 免费日韩成人| 美女网站久久| 狠狠色综合日日| 亚洲夜间福利| 亚洲一区二区三区乱码aⅴ| 欧美成人午夜影院| 蜜桃久久av| 国产精品地址| 亚洲精品欧美精品| 亚洲精选在线| 欧美国产视频日韩| 亚洲第一精品影视| 亚洲风情亚aⅴ在线发布| 欧美一级电影久久| 久久激情一区| 国产在线播放一区二区三区| 亚洲欧美在线网| 久久国产精品免费一区| 国产欧美精品日韩精品| 亚洲一区视频| 欧美专区一区二区三区| 国产在线不卡| 欧美制服丝袜第一页| 久久精品亚洲精品| 国模叶桐国产精品一区| 久久久水蜜桃av免费网站| 美国三级日本三级久久99| 亚洲大片av| 欧美精品一区二区三| 欧美激情一区二区三区不卡| 国产一区二区欧美日韩| 欧美二区在线播放| 亚洲狼人综合| 亚洲欧美日韩综合国产aⅴ| 国产亚洲精品久久久| 久久久综合香蕉尹人综合网| 欧美大胆人体视频| 99国产精品自拍| 欧美性猛交视频| 欧美一区二区观看视频| 免费观看国产成人| 艳女tv在线观看国产一区| 国产精品theporn| 久久国产福利国产秒拍| 欧美激情一区二区三区在线| 亚洲尤物影院| 尤物精品在线| 欧美日韩日本国产亚洲在线| 一区二区国产日产| 男人插女人欧美| 亚洲线精品一区二区三区八戒| 国产精品午夜视频| 久久综合电影| 亚洲尤物影院| 亚洲国产欧美一区二区三区久久 | 欧美日韩精品一区二区| 欧美在线播放一区二区| 亚洲破处大片| 久久久国产精品一区| 国产日韩在线一区二区三区| 久久久久久一区二区三区| 亚洲国产精品久久久久婷婷884 | 国产一区二区成人久久免费影院| 欧美成人午夜影院| 久久成人精品一区二区三区| 亚洲美女电影在线| 久久se精品一区精品二区| 亚洲精品永久免费| 黄色亚洲免费| 国产精品一区二区在线观看| 欧美激情国产日韩| 久久久天天操| 欧美一区成人| 中文日韩在线视频| 亚洲第一中文字幕| 亚洲一区一卡| 亚洲一区3d动漫同人无遮挡| 亚洲人体1000| 在线观看成人av| 国内精品免费午夜毛片| 国产精品日韩欧美一区| 欧美日韩视频在线第一区| 麻豆成人精品| 久久久久免费视频| 久久不射2019中文字幕| 亚洲欧美在线网| 亚洲欧美日韩在线观看a三区| 一区二区三区免费看| 欧美成人一品| 蜜臀av一级做a爰片久久| 久久久成人网| 久久米奇亚洲| 麻豆精品视频在线| 久久久久一区二区| 久久五月婷婷丁香社区| 久久久久久穴| 久久免费偷拍视频| 久久久久久免费| 美女黄毛**国产精品啪啪| 亚洲欧美日韩高清| 亚洲电影观看| 亚洲国产精品嫩草影院| 亚洲国产精品一区二区第四页av| 在线成人中文字幕| 亚洲国产老妈| 日韩亚洲欧美高清| 亚洲午夜精品网| 西瓜成人精品人成网站| 久久av一区二区三区亚洲| 欧美一区二区久久久| 亚洲在线不卡| 欧美一区二区播放| 久久精品一区二区三区四区| 久久久精品一区二区三区| 久久综合亚州| 亚洲高清不卡av| 夜夜嗨网站十八久久| 亚洲自拍电影| 久久精品国产精品亚洲综合| 榴莲视频成人在线观看| 欧美激情一区二区三区在线| 久久精品九九| 久久久久久久久久看片| 免费成人黄色片| 欧美日韩一区二区三| 国产亚洲观看| 亚洲另类一区二区| 欧美一区二区三区婷婷月色 | 在线观看欧美日韩国产| 一区二区三区四区在线| 欧美一区二区视频在线观看| 欧美激情1区2区3区| 亚洲一区二区视频在线| 午夜免费电影一区在线观看| 欧美大色视频| 国产日产高清欧美一区二区三区| 亚洲国产精选| 欧美中文在线观看国产| 亚洲精品乱码久久久久久蜜桃麻豆 | 精品999在线观看| 这里只有精品视频| 免费成人在线视频网站|