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

李帥的博客

軟件開發(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>
            亚洲国产欧美一区二区三区久久 | 欧美福利一区二区| 久久久久www| 在线视频你懂得一区二区三区| 欧美一级黄色网| 亚洲综合首页| 欧美伦理在线观看| 亚洲国产一区在线| 有坂深雪在线一区| 久久爱www.| 久久久精品午夜少妇| 国产麻豆精品久久一二三| 亚洲最新合集| 亚洲视频在线视频| 欧美日本精品在线| 亚洲精品一区二区三区福利| 亚洲三级观看| 欧美成人精品h版在线观看| 免费观看成人www动漫视频| 激情久久五月天| 久久国产手机看片| 每日更新成人在线视频| 狠狠色综合播放一区二区| 欧美在线3区| 久久中文欧美| 亚洲第一久久影院| 女生裸体视频一区二区三区 | 欧美中文字幕精品| 国产欧美日韩视频一区二区| 欧美一区二区三区日韩| 久久国产精品一区二区三区四区| 国产精品自拍在线| 欧美在线看片| 欧美高清一区| 艳妇臀荡乳欲伦亚洲一区| 欧美色精品天天在线观看视频| 99pao成人国产永久免费视频| 亚洲网友自拍| 国产日韩视频| 亚洲欧美精品一区| 国产亚洲va综合人人澡精品| 欧美在线观看网址综合| 欧美承认网站| 亚洲影视九九影院在线观看| 国产精品免费一区二区三区在线观看 | 欧美精选一区| 亚洲欧美精品伊人久久| 久久美女性网| aa亚洲婷婷| 国产日韩欧美二区| 免费国产一区二区| 宅男噜噜噜66国产日韩在线观看| 久久精品国产精品亚洲综合| 亚洲国产成人精品久久| 欧美日韩亚洲免费| 久久精品二区亚洲w码| 亚洲电影免费观看高清完整版在线 | 在线视频观看日韩| 欧美日韩另类一区| 久久riav二区三区| 亚洲日本中文| 久久久久久成人| 一区二区三区视频观看| 狠狠色狠狠色综合日日小说 | 欧美激情1区| 欧美一区二区三区日韩| 91久久黄色| 久久久久这里只有精品| 在线亚洲激情| 亚洲国产片色| 国产在线不卡精品| 欧美视频一区在线| 免费不卡在线观看av| 亚洲欧美日韩在线| 亚洲精品自在久久| 欧美成人有码| 久久久久久久网站| 欧美亚洲综合久久| 中文日韩在线| 亚洲乱码国产乱码精品精98午夜| 国产欧美精品在线观看| 欧美亚州在线观看| 欧美激情欧美激情在线五月| 久久精品亚洲一区| 性欧美精品高清| 亚洲深夜福利网站| 日韩午夜在线电影| 亚洲国产高清在线| 你懂的视频欧美| 久久久亚洲综合| 久久精品国产99国产精品澳门| 中文精品视频| 一区二区三区视频在线观看| 亚洲精品国产欧美| 亚洲国产欧美不卡在线观看| 在线观看的日韩av| 激情成人av| 精品动漫3d一区二区三区免费版| 国产日韩精品入口| 国产区精品视频| 国产区二精品视| 国产亚洲精品7777| 红桃视频欧美| 在线播放日韩专区| 亚洲国产视频一区| 亚洲人精品午夜在线观看| 亚洲国产一区二区三区在线播 | 国产综合色在线视频区| 国产亚洲精品久久飘花| 国产一区二区三区黄| 国内揄拍国内精品久久| 伊大人香蕉综合8在线视| 亚洲福利视频网| 最新日韩精品| 一区二区三区欧美| 午夜视频精品| 久久久久国产精品厨房| 另类欧美日韩国产在线| 欧美a级在线| 亚洲区中文字幕| 99国产精品久久久久久久成人热| 一区二区三区导航| 欧美伊人久久| 免费视频亚洲| 欧美深夜福利| 国产日韩一区二区三区| 在线日韩视频| 一区二区三区不卡视频在线观看 | 在线免费精品视频| 99国产精品久久久| 亚洲专区欧美专区| 久久视频这里只有精品| 欧美成人第一页| 亚洲三级电影全部在线观看高清| 亚洲欧洲日本在线| 亚洲欧美清纯在线制服| 久久久久国产一区二区三区四区 | 美日韩免费视频| 欧美日韩国产另类不卡| 国产日韩欧美不卡| 亚洲精品久久| 欧美中文字幕不卡| 亚洲国产精品久久久久秋霞影院 | 欧美精品在线极品| 国产亚洲人成网站在线观看| 亚洲精品国产精品久久清纯直播| 亚洲在线电影| 欧美激情免费在线| 亚洲欧美精品一区| 欧美日韩成人综合| 极品av少妇一区二区| 亚洲一二三四久久| 美女性感视频久久久| 亚洲愉拍自拍另类高清精品| 欧美成人免费全部| 国产一区导航| 亚洲一区二区三区午夜| 欧美激情精品久久久六区热门| 亚洲欧美日韩在线不卡| 欧美国产亚洲精品久久久8v| 国产一区二区三区日韩欧美| 亚洲天堂视频在线观看| 亚洲高清自拍| 久久久久免费| 国产日韩欧美高清免费| 亚洲一区二区高清| 亚洲国产成人av在线| 久久成人18免费观看| 国产精品色婷婷久久58| 一本一本a久久| 欧美韩国日本一区| 久久久久久久久蜜桃| 国产小视频国产精品| 亚洲欧美国产日韩天堂区| 亚洲美女在线观看| 欧美精品系列| 亚洲精品一区二区三区av| 免费视频一区二区三区在线观看| 亚洲自拍偷拍视频| 国产精品成人播放| 亚洲一区不卡| 99ri日韩精品视频| 欧美激情综合在线| 亚洲美女毛片| 亚洲欧洲在线一区| 欧美大片一区二区| 亚洲级视频在线观看免费1级| 久久久91精品国产| 亚洲欧美日韩直播| 国产精品亚洲综合天堂夜夜| 亚洲无亚洲人成网站77777 | 欧美区视频在线观看| 一本色道久久99精品综合| 亚洲国产日韩欧美在线动漫| 美女免费视频一区| 亚洲另类自拍| 日韩午夜在线| 国产精品欧美日韩| 欧美专区在线播放| 久久精品二区|