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

李帥的博客

軟件開發(fā)愛(ài)好者

  C++博客 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
  14 隨筆 :: 3 文章 :: 4 評(píng)論 :: 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 []()

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

附上我的選擇和疑問(wèn),歡迎大家指正和討論:

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) 評(píng)論(1)  編輯 收藏 引用

評(píng)論

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


只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   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>
            欧美一区二区三区的| 亚洲美女在线视频| 欧美v亚洲v综合ⅴ国产v| 亚洲欧美成人网| 午夜欧美精品| 欧美一区二区三区免费观看| 亚洲人成在线观看一区二区| 欧美极品一区二区三区| 欧美日韩一区在线观看| 欧美午夜在线一二页| 欧美日韩国产不卡在线看| 欧美色中文字幕| 国产色产综合色产在线视频| 136国产福利精品导航| 中文欧美字幕免费| 亚洲欧美成人网| 久久综合色天天久久综合图片| 欧美gay视频激情| 一区二区三区精品| 久久精品一区二区| 国产精品成人一区二区艾草| 好吊色欧美一区二区三区四区 | 国产精品中文在线| 国内精品国语自产拍在线观看| 久久午夜羞羞影院免费观看| 欧美精品乱码久久久久久按摩| 欧美日韩黄色大片| 国产日韩欧美不卡| 亚洲第一区在线| 久久久久久尹人网香蕉| 亚洲日本免费| 日韩亚洲欧美一区| 久久成人精品| 国产精品久久久久久久久久三级| 国产一区二区你懂的| 亚洲精品在线免费| 久久欧美中文字幕| 亚洲一区二区三区免费视频| 欧美搞黄网站| 在线成人亚洲| 午夜国产精品视频免费体验区| 老司机午夜精品视频| 正在播放欧美一区| 欧美激情在线免费观看| 韩国av一区二区三区四区| 欧美激情影院| 激情五月***国产精品| 99re这里只有精品6| 久久国产一区| 亚洲午夜在线视频| 久久久人成影片一区二区三区| 国产目拍亚洲精品99久久精品| 99国产精品一区| 亚洲风情亚aⅴ在线发布| 亚洲免费网站| 国产精品爽爽ⅴa在线观看| 一本不卡影院| 欧美电影打屁股sp| 欧美v日韩v国产v| 国产综合欧美在线看| 久久精品av麻豆的观看方式| 亚洲午夜91| 欧美视频不卡| 午夜精品久久| 午夜久久电影网| 国产一区二区三区的电影| 久久精彩视频| 久久九九久久九九| 国内外成人在线| 久久久一二三| 狂野欧美激情性xxxx欧美| 国产亚洲综合在线| 久久av资源网站| 欧美一区二区视频97| 国内外成人免费激情在线视频网站| 美女视频黄 久久| 美女在线一区二区| 亚洲人午夜精品| 一区二区三区欧美视频| 国产欧美在线观看| 免费91麻豆精品国产自产在线观看| 久久综合色天天久久综合图片| 亚洲精品欧美| 亚洲一区二区三区四区中文| 国内激情久久| 亚洲美女av网站| 国产精品手机视频| 欧美成人中文字幕在线| 欧美日韩卡一卡二| 欧美国产日韩精品免费观看| 狠狠干综合网| 蜜臀av性久久久久蜜臀aⅴ| 欧美高清日韩| 小黄鸭精品aⅴ导航网站入口| 久久精品成人| 亚洲色无码播放| 久久精品国产免费观看| 一区二区欧美亚洲| 久久精品一区二区| 亚洲一区二区三区乱码aⅴ| 久久精品国产2020观看福利| 日韩特黄影片| 欧美在线一区二区三区| 一区二区三区四区国产精品| 久久久精品2019中文字幕神马| 一本不卡影院| 麻豆精品视频| 久久国产一区二区| 欧美性大战久久久久久久蜜臀| 久久亚洲二区| 国产午夜精品在线| 中文亚洲欧美| av不卡在线| 老司机午夜精品视频在线观看| 欧美在线视频免费观看| 欧美三级日本三级少妇99| 欧美国产在线电影| 在线观看亚洲视频啊啊啊啊| 亚洲欧美激情视频| 亚洲一区不卡| 欧美日韩视频一区二区三区| 欧美国产日韩二区| 怡红院精品视频| 欧美综合国产| 久久精品视频在线免费观看| 国产精品海角社区在线观看| 亚洲精品色图| 日韩一区二区精品在线观看| 美女国产一区| 亚洲电影毛片| 亚洲欧洲日本国产| 欧美chengren| 亚洲激情一区二区| 亚洲麻豆av| 欧美区一区二| 99香蕉国产精品偷在线观看| 中日韩视频在线观看| 欧美日韩aaaaa| 亚洲视频福利| 欧美在线观看www| 国产有码在线一区二区视频| 久久国产精品亚洲77777| 久热爱精品视频线路一| 亚洲国产精品一区二区第一页| 久久久美女艺术照精彩视频福利播放 | 欧美成人一区二免费视频软件| 国产日本欧洲亚洲| 亚洲综合电影一区二区三区| 欧美一进一出视频| 国产综合亚洲精品一区二| 性欧美18~19sex高清播放| 欧美影院精品一区| 亚洲国产精品v| 亚洲精选久久| 狂野欧美激情性xxxx欧美| 免费久久精品视频| 亚洲国产精品精华液2区45| 另类天堂视频在线观看| 亚洲福利视频在线| 亚洲视频第一页| 欧美色播在线播放| 性做久久久久久免费观看欧美| 久久三级福利| 亚洲精品在线视频观看| 欧美日韩一区二区在线播放| 一道本一区二区| 久久精品亚洲热| 亚洲欧洲日产国产网站| 欧美日韩国产成人高清视频| 亚洲欧美日本另类| 亚洲国产99精品国自产| 亚洲欧美中文字幕| 亚洲国产天堂久久国产91| 欧美色播在线播放| 久久综合电影一区| 亚洲一区图片| 欧美激情视频在线播放| 亚洲图片在线观看| 亚洲电影视频在线| 欧美日韩在线播放三区| 久久精品欧洲| 一区二区三区四区蜜桃| 欧美sm视频| 久久精品成人一区二区三区| 亚洲开发第一视频在线播放| 国产日韩专区在线| 欧美精品粉嫩高潮一区二区| 欧美在线视频免费播放| 亚洲精品一区二区三区四区高清| 午夜精品一区二区三区在线| 亚洲国产视频a| 国内久久精品视频| 欧美午夜久久| 欧美不卡一区| 老**午夜毛片一区二区三区| 亚洲欧美在线一区二区| av成人天堂| 欧美电影在线观看| 久久亚洲国产精品一区二区| 日韩视频久久|