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

李帥的博客

軟件開發愛好者

  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 李帥 閱讀(1379) 評論(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>
            91久久线看在观草草青青| 在线欧美一区| 亚洲一区二区三区四区中文| 亚洲国产视频a| 欧美激情第3页| 亚洲一级高清| 亚洲宅男天堂在线观看无病毒| 国产精品人人做人人爽人人添| 欧美一级片久久久久久久| 妖精视频成人观看www| 亚洲品质自拍| 国产精品高潮呻吟视频| 亚洲精品少妇网址| 日韩亚洲欧美高清| 国产欧美日韩精品一区| 免费观看成人网| 欧美日韩免费观看一区三区| 亚洲资源av| 久久九九有精品国产23| 99精品视频免费观看视频| 亚洲综合成人在线| 亚洲国产精品嫩草影院| 99综合电影在线视频| 韩国女主播一区二区三区| 亚洲激情影院| 国产一区91精品张津瑜| 亚洲黄色成人久久久| 国产欧美一区二区精品秋霞影院| 欧美 日韩 国产 一区| 欧美亚洲成人网| 亚洲伦理中文字幕| 午夜久久久久久久久久一区二区| 欧美三级第一页| 久久久久久69| 欧美性一区二区| 欧美肥婆在线| 国产欧美韩国高清| 亚洲美女精品成人在线视频| 韩国av一区二区三区在线观看| 日韩午夜中文字幕| 亚洲欧洲偷拍精品| 欧美亚洲免费高清在线观看| 一区二区不卡在线视频 午夜欧美不卡'| 午夜精品视频一区| 一区二区欧美激情| 免费一级欧美片在线观看| 欧美一区二区网站| 国产精品yjizz| 91久久久国产精品| 亚洲国产成人久久综合| 欧美一区二区三区成人| 亚洲综合精品自拍| 欧美日韩一区在线视频| 亚洲第一综合天堂另类专| 国内外成人免费激情在线视频网站 | 国产精品久久一卡二卡| 亚洲激情欧美| 亚洲国产精品久久久久秋霞影院| 欧美一级片在线播放| 欧美一区2区三区4区公司二百| 欧美精品在线一区| 亚洲精品社区| 99日韩精品| 欧美日本高清| 亚洲理论在线观看| 99亚洲伊人久久精品影院红桃| 蜜桃av一区| 亚洲欧美日韩一区在线| 欧美午夜精品久久久久久人妖 | 亚洲一区三区电影在线观看| 欧美韩日一区二区| 亚洲日本中文| 一区二区三区欧美日韩| 欧美视频中文一区二区三区在线观看| 亚洲精品欧美日韩专区| 亚洲手机视频| 国产精品一区二区久久| 欧美亚洲一区二区在线观看| 久久婷婷国产综合国色天香| 亚洲国产成人不卡| 欧美精品大片| 亚洲网站在线| 久久亚洲电影| 亚洲高清网站| 欧美三级视频| 欧美一区二区精品在线| 嫩草影视亚洲| 亚洲图片欧美一区| 国产精品永久入口久久久| 欧美一区国产二区| 亚洲第一网站免费视频| 99精品免费| 国产日产亚洲精品系列| 久久综合网色—综合色88| 亚洲精品少妇30p| 久久av一区二区三区| 曰韩精品一区二区| 欧美日韩在线不卡一区| 欧美在线免费观看| 最新成人在线| 久久久99精品免费观看不卡| 亚洲欧洲视频在线| 国产日韩欧美在线播放不卡| 欧美sm视频| 午夜在线观看欧美| 亚洲美女中出| 美女性感视频久久久| 亚洲午夜精品网| 亚洲高清av在线| 国产精品一区二区三区四区 | 美女国内精品自产拍在线播放| 日韩一级精品| 免费久久99精品国产自| 亚洲欧美日本在线| 亚洲精品国久久99热| 国产午夜精品福利| 欧美视频在线视频| 欧美大片国产精品| 久久国产精品高清| 亚洲一区日韩| 99亚洲伊人久久精品影院红桃| 葵司免费一区二区三区四区五区| 亚洲一区二区三区精品动漫| 亚洲黄色一区二区三区| 国产尤物精品| 国产精品专区h在线观看| 欧美日韩国产限制| 欧美激情bt| 免费不卡在线观看| 久久久亚洲高清| 亚欧成人在线| 欧美一级久久久| 亚洲在线视频一区| 亚洲视频在线免费观看| 日韩亚洲欧美一区二区三区| 亚洲免费在线视频一区 二区| 最新成人av网站| 亚洲国产网站| 欧美成人小视频| 你懂的亚洲视频| 欧美国产日韩一区二区三区| 久热爱精品视频线路一| 久久在线播放| 毛片一区二区| 欧美α欧美αv大片| 老司机午夜精品| 男女激情久久| 欧美激情精品久久久六区热门| 欧美+日本+国产+在线a∨观看| 六十路精品视频| 欧美xx视频| 91久久久亚洲精品| 最新热久久免费视频| 91久久国产自产拍夜夜嗨| 亚洲激情亚洲| 一区二区三区精品在线| 亚洲小说欧美另类社区| 午夜亚洲福利在线老司机| 欧美一区激情| 欧美jjzz| 欧美三级日韩三级国产三级| 国产精品v片在线观看不卡| 国产精品免费一区二区三区观看| 欧美亚男人的天堂| 国内精品久久久久久 | 国产色产综合产在线视频| 国内精品视频在线播放| 最新国产乱人伦偷精品免费网站| 亚洲精品一区二区三区樱花| 亚洲永久免费| 久久久久成人精品免费播放动漫| 老牛影视一区二区三区| 日韩网站在线看片你懂的| 亚洲一区网站| 欧美91精品| 国产精品专区一| 亚洲高清123| 亚洲欧美日韩中文在线制服| 麻豆av一区二区三区| 99ri日韩精品视频| 欧美一区二区三区日韩视频| 美日韩精品视频| 国产精品视频yy9299一区| 1024成人| 久久国产精品72免费观看| 亚洲国产高清一区二区三区| 亚洲午夜精品久久| 牛夜精品久久久久久久99黑人| 欧美日韩亚洲一区二区三区在线观看| 国内精品视频在线观看| 亚洲无线一线二线三线区别av| 久久久一本精品99久久精品66| 亚洲久色影视| 蜜桃久久精品一区二区| 国产精品试看| 亚洲天堂第二页| 亚洲福利av| 久久女同精品一区二区| 国产精品亚洲成人| 亚洲永久免费av|