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

李帥的博客

軟件開發愛好者

  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 李帥 閱讀(1378) 評論(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>
            午夜欧美不卡精品aaaaa| 日韩午夜在线| 久久久国产精品一区| 亚洲欧美国内爽妇网| 欧美日韩中字| 在线一区二区三区四区五区| 99re视频这里只有精品| 国产精品h在线观看| 午夜精品久久久久久久99水蜜桃| 亚洲一本视频| 精品69视频一区二区三区| 久久综合精品一区| 亚洲免费成人| 这里是久久伊人| 欧美系列亚洲系列| 欧美尤物一区| 另类天堂av| 亚洲影音一区| 欧美诱惑福利视频| 99精品欧美一区二区蜜桃免费| 一区二区三区四区五区在线| 国产亚洲毛片| 亚洲国内在线| 老司机免费视频久久| 亚洲调教视频在线观看| 久久超碰97中文字幕| 亚洲卡通欧美制服中文| 亚洲欧美日韩精品久久奇米色影视| 韩日视频一区| 一本色道久久综合亚洲91| 国内偷自视频区视频综合| 亚洲大片av| 国产亚洲制服色| 亚洲免费电影在线| 国产精品一二三| 91久久一区二区| 国产色综合网| 9l视频自拍蝌蚪9l视频成人| 精品不卡视频| 99热在这里有精品免费| 亚洲国产99精品国自产| 亚洲在线电影| 亚洲日本va午夜在线电影| 性欧美videos另类喷潮| 一区二区欧美在线| 另类av导航| 久久天堂精品| 国产欧美日韩综合| 一区二区欧美在线| 亚洲六月丁香色婷婷综合久久| 久久精品91久久久久久再现| 午夜精品剧场| 欧美日韩亚洲一区三区| 亚洲高清不卡在线观看| 亚洲承认在线| 久久精品欧洲| 久久久一本精品99久久精品66| 国产精品高潮视频| 亚洲精品麻豆| 日韩一级免费观看| 欧美激情一二三区| 欧美电影在线| 亚洲国产欧美日韩另类综合| 久久久久久穴| 美女国产一区| 亚洲国产高清自拍| 麻豆精品视频在线观看| 欧美www视频在线观看| 黄色一区二区在线观看| 久久精品日产第一区二区| 久久久久久久久岛国免费| 国产日韩欧美二区| 久久成人亚洲| 免费日韩视频| 亚洲精品视频在线播放| 欧美成人资源| 99精品热视频| 欧美中文字幕在线视频| 国内精品久久久久久久影视蜜臀| 欧美在线三级| 牛人盗摄一区二区三区视频| 亚洲人成人一区二区三区| 欧美区一区二区三区| 99热在线精品观看| 久久久精品五月天| 亚洲激情影院| 欧美日韩一区二区视频在线观看| 亚洲视频精选在线| 久久久亚洲精品一区二区三区 | 久久精品一区蜜桃臀影院| 久久久国产精品一区| 亚洲经典视频在线观看| 欧美日韩高清免费| 亚洲综合成人在线| 女同性一区二区三区人了人一 | 欧美日韩一区二区三区四区五区| 亚洲综合国产| 免费国产自线拍一欧美视频| 亚洲美女中文字幕| 国产精品爽爽爽| 巨乳诱惑日韩免费av| 亚洲麻豆视频| 久久综合电影| 夜夜嗨av色一区二区不卡| 国产精品一级久久久| 久久视频在线看| 亚洲视频一区二区免费在线观看| 久久久国产成人精品| 一本色道久久综合亚洲精品按摩| 国产三级欧美三级| 欧美精品尤物在线| 欧美在线精品一区| 一二三四社区欧美黄| 美日韩精品免费观看视频| 亚洲视频自拍偷拍| 亚洲国产美女久久久久| 国产噜噜噜噜噜久久久久久久久| 欧美凹凸一区二区三区视频| 香蕉久久夜色精品国产使用方法 | 先锋影音国产一区| 亚洲日本精品国产第一区| 国产亚洲欧美日韩美女| 欧美色道久久88综合亚洲精品| 久久一区精品| 欧美一区二区在线观看| 亚洲天堂成人在线观看| 91久久亚洲| 亚洲国产黄色| 欧美va亚洲va日韩∨a综合色| 久久福利视频导航| 亚洲图中文字幕| 日韩一区二区高清| 亚洲人成网在线播放| 伊人影院久久| 黄色日韩网站| 国产综合色在线视频区| 国产美女精品视频| 国产精品丝袜白浆摸在线| 欧美日韩亚洲综合| 欧美日韩亚洲一区二区| 欧美日本亚洲韩国国产| 欧美激情一区二区三区蜜桃视频 | 久久免费国产| 久久人人精品| 久久色在线播放| 久久蜜臀精品av| 男人的天堂亚洲| 男同欧美伦乱| 欧美国产日韩一二三区| 免费不卡中文字幕视频| 欧美不卡一卡二卡免费版| 免费av成人在线| 欧美另类一区二区三区| 欧美日韩综合| 国产精品视频免费观看www| 国产精品亚洲综合| 国产曰批免费观看久久久| 国产综合久久久久影院| 亚洲国产成人在线| 亚洲精品综合| 亚洲制服av| 久久久久久精| 亚洲大片一区二区三区| 亚洲高清影视| 中文国产成人精品久久一| 亚洲欧美日韩国产成人| 久久久人成影片一区二区三区 | 欧美在线播放视频| 久久久久se| 欧美精品在线一区| 国产精品视频久久| 原创国产精品91| 一区二区欧美精品| 久久久999精品| 亚洲承认在线| 亚洲视频图片小说| 久久免费偷拍视频| 欧美日韩第一页| 国产伦一区二区三区色一情| 在线精品视频一区二区| 99综合在线| 久久精品国产2020观看福利| 欧美成人69av| 亚洲视频福利| 欧美成人免费va影院高清| 国产精品久久久久久久午夜| 在线不卡中文字幕| 亚洲欧美日韩视频二区| 欧美成人日韩| 先锋a资源在线看亚洲| 欧美高清在线视频观看不卡| 国产精品综合久久久| 亚洲免费久久| 久久综合999| 中文欧美字幕免费| 欧美插天视频在线播放| 国模吧视频一区| 午夜精品久久久久久久99樱桃| 欧美激情视频在线免费观看 欧美视频免费一| 99国产精品久久久久老师|