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

李帥的博客

軟件開發愛好者

  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 李帥 閱讀(1383) 評論(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>
            欧美精品一区二区三| 男人的天堂亚洲| 一区二区三区.www| 亚洲欧美三级在线| 久久国产天堂福利天堂| 毛片一区二区| 99国内精品| 香蕉国产精品偷在线观看不卡| 欧美与欧洲交xxxx免费观看| 久久久一区二区| 欧美日韩一区二区视频在线| 国产亚洲一区二区三区在线观看 | 国产精品高潮呻吟| 国产视频久久| 亚洲夜晚福利在线观看| 久久久www免费人成黑人精品| 亚洲日本免费| 午夜欧美电影在线观看| 亚洲欧美中文另类| 欧美精品一级| 伊人狠狠色j香婷婷综合| 一二三四社区欧美黄| 久久天天狠狠| 亚洲欧美色一区| 亚洲国产91色在线| 性色av一区二区三区| 亚洲美女91| 欧美第一黄色网| 国内精品一区二区| 欧美一区=区| 在线一区二区视频| 欧美精品色网| 久久久最新网址| 久久精品理论片| 国产一区二区三区四区三区四| 欧美国产日韩亚洲一区| 久久久成人精品| 宅男66日本亚洲欧美视频 | 久热精品视频| 欧美日韩日本国产亚洲在线| 久久人人九九| 国产农村妇女精品| 亚洲欧美第一页| 亚洲一区欧美二区| 欧美三区免费完整视频在线观看| 亚洲最新视频在线| 久久久久久久精| 亚洲欧美视频在线观看视频| 欧美成人综合网站| 久久视频精品在线| 欧美午夜免费| 欧美诱惑福利视频| 欧美日韩亚洲一区| 欧美成人精品影院| 狠狠色综合色综合网络| 久久免费视频在线观看| 国产精品亚洲综合色区韩国| 久久福利毛片| 久久亚洲电影| 一区二区欧美视频| 欧美岛国在线观看| 欧美www视频| 亚洲第一成人在线| 亚洲精品久久久久中文字幕欢迎你| 黄色一区二区在线观看| 91久久国产综合久久| 国产精品久久一区二区三区| 久久久噜噜噜久久久| 国产精品一区二区三区四区五区| 久久尤物电影视频在线观看| 国产一区二区在线观看免费| 午夜亚洲性色视频| 久久精精品视频| 国内精品久久久久久久影视麻豆 | 日韩一区二区免费看| 国产精品专区一| 午夜精品在线视频| 久久久精品日韩| 在线看成人片| 免费高清在线视频一区·| 在线视频一区二区| 欧美三日本三级三级在线播放| 99亚洲视频| 香蕉乱码成人久久天堂爱免费| 国产精品美女久久福利网站| 亚洲免费网址| 一区二区久久| 国产精品国产| 欧美中文在线观看| 六月天综合网| 99国产精品视频免费观看一公开| 亚洲欧美日韩另类| 久久―日本道色综合久久| 在线观看视频一区二区欧美日韩| 欧美h视频在线| 欧美主播一区二区三区| 伊人精品视频| 欧美日韩一区二区三区视频| 亚洲免费网址| 欧美激情一区| 亚洲女ⅴideoshd黑人| 国产一级久久| 欧美日韩国产免费观看| 蜜桃视频一区| 狠狠入ady亚洲精品经典电影| 蜜桃av一区| 亚洲你懂的在线视频| 嫩草国产精品入口| 亚洲永久在线| 欧美日韩综合网| 久久久久天天天天| 一区二区高清视频| 亚洲一区二区三区在线观看视频| 国产一区二区三区黄视频| 欧美国产欧美亚洲国产日韩mv天天看完整 | 欧美影院在线播放| 亚洲日韩成人| 欧美xxxx在线观看| 欧美主播一区二区三区| aⅴ色国产欧美| 激情综合自拍| 国产伦一区二区三区色一情| 欧美大片va欧美在线播放| 性久久久久久久久久久久| 亚洲欧洲在线视频| 免费不卡在线观看| 欧美一区亚洲| 午夜国产精品视频| 一区二区三区四区五区在线| 亚洲成色777777女色窝| 国产一区二区久久| 国产美女精品在线| 国产精品国产亚洲精品看不卡15| 欧美成人精品高清在线播放| 久久蜜桃精品| 久久美女性网| 久久久久久久综合| 欧美专区第一页| 午夜久久久久久| 亚洲男人av电影| 亚洲一区二区三区高清不卡| 日韩五码在线| 一本色道久久88精品综合| 亚洲日本在线观看| 亚洲精品视频在线看| 亚洲日本黄色| 99国产一区| 亚洲一级片在线看| 久久久久五月天| 久久久久.com| 另类国产ts人妖高潮视频| 久久免费精品日本久久中文字幕| 久久精品综合网| 久久中文欧美| 欧美大片免费久久精品三p| 一本久道久久综合婷婷鲸鱼| 日韩网站在线观看| 制服丝袜亚洲播放| 国产一区二区中文| 黑人巨大精品欧美黑白配亚洲 | 美女网站在线免费欧美精品| 你懂的亚洲视频| 欧美精品一区二区三区高清aⅴ| 欧美绝品在线观看成人午夜影视| 欧美伦理视频网站| 国产精品剧情在线亚洲| 国产乱理伦片在线观看夜一区| 国产精品一区二区男女羞羞无遮挡 | 欧美国产精品久久| 欧美日韩色一区| 国产精品无码专区在线观看| 国产亚洲视频在线| 亚洲国产日韩欧美在线99| 国产伦精品一区二区三区在线观看 | 亚洲一区二区三区在线看| 亚洲自拍啪啪| 久久精品一区二区三区四区 | 欧美福利视频在线| 亚洲日本中文字幕免费在线不卡| 一区二区欧美国产| 欧美一区二视频| 亚洲专区国产精品| 久久精品女人天堂| 欧美精品一区视频| 国产一区二区三区四区hd| 91久久精品美女| 国外成人性视频| 日韩视频一区二区三区| 在线播放中文一区| 中日韩美女免费视频网址在线观看| 欧美在线视频a| 亚洲激情电影中文字幕| 亚洲一区二区毛片| 美女啪啪无遮挡免费久久网站| 国产精品hd| 亚洲第一色在线| 欧美一区二区播放| 亚洲欧洲在线一区| 久久国产乱子精品免费女| 性欧美8khd高清极品|