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

李帥的博客

軟件開發(fā)愛好者

  C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
  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]  回復  更多評論
  


只有注冊用戶登錄后才能發(fā)表評論。
網站導航: 博客園   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>
            暖暖成人免费视频| 亚洲精品国产精品久久清纯直播 | 亚洲国产精品久久久久久女王| 欧美亚洲日本国产| 欧美一区二区三区四区视频| 国产午夜久久| 欧美风情在线| 国产精品videossex久久发布| 欧美一级理论片| 久久久久久电影| 日韩网站在线| 亚洲欧美一区二区视频| 影音先锋久久久| 99在线|亚洲一区二区| 国产一级一区二区| 亚洲二区三区四区| 国产精品红桃| 蜜桃久久av一区| 欧美日韩精品一区二区三区四区 | 99精品国产在热久久| 亚洲一区二区三区四区视频| 激情综合五月天| 亚洲最新在线视频| 今天的高清视频免费播放成人 | 在线视频精品一| 激情婷婷欧美| 一区二区国产精品| 亚洲第一二三四五区| 一本色道久久综合狠狠躁的推荐| 国产日韩一区二区| 日韩视频免费在线| 激情综合自拍| 亚洲伊人网站| 亚洲精品欧美在线| 久久精品国产清自在天天线| 亚洲视频一区二区| 蜜桃av噜噜一区| 久久国产欧美| 国产精品成av人在线视午夜片| 欧美大片在线看| 国产一区香蕉久久| 亚洲一区二区三区中文字幕| 亚洲精品久久久久久一区二区| 午夜精品久久久久久久99热浪潮| 99re6热在线精品视频播放速度| 欧美在线黄色| 亚洲欧美日韩国产精品| 亚洲欧美日韩精品| 欧美福利一区二区| 亚洲精品一区二区三区在线观看| 国产精品亚洲成人| 欧美巨乳波霸| 久久久久久尹人网香蕉| 欧美色视频一区| 亚洲日本电影| 99re成人精品视频| 免费亚洲一区| 欧美成人综合一区| 亚洲二区三区四区| 久久久久久日产精品| 性色av一区二区三区在线观看| 欧美精品一区三区在线观看| 欧美国产一区在线| 亚洲激情在线观看视频免费| 久久―日本道色综合久久| 久久久99久久精品女同性| 国产欧美日韩一区| 香蕉成人久久| 久久男人av资源网站| 国产自产2019最新不卡| 欧美在线一二三四区| 久久一二三国产| 在线欧美视频| 可以看av的网站久久看| 亚洲电影在线播放| 亚洲另类黄色| 国产精品久久久久aaaa| 亚洲综合色激情五月| 久久九九99视频| 曰韩精品一区二区| 欧美大色视频| 99成人在线| 午夜在线观看免费一区| 韩国av一区二区三区| 卡通动漫国产精品| aa国产精品| 久久精品视频播放| 亚洲欧洲一区二区三区久久| 欧美国产日韩亚洲一区| 亚洲无线视频| 免费观看欧美在线视频的网站| 亚洲国产小视频在线观看| 欧美色精品天天在线观看视频 | 亚洲男人av电影| 麻豆av一区二区三区| 亚洲经典在线看| 欧美性片在线观看| 久久久精彩视频| 亚洲精品日产精品乱码不卡| 香蕉久久夜色精品国产使用方法| 激情欧美一区| 国产精品国产三级国产专区53 | 亚洲桃花岛网站| 久久综合九色综合欧美就去吻| 亚洲美女性视频| 国产专区欧美专区| 欧美日韩视频| 久久噜噜亚洲综合| 亚洲小视频在线| 亚洲国产日韩欧美在线99| 亚洲欧美三级在线| 日韩一二三区视频| 韩日视频一区| 国产精品一区三区| 欧美另类综合| 久久一区二区三区超碰国产精品| 亚洲线精品一区二区三区八戒| 欧美高清不卡在线| 久久日韩粉嫩一区二区三区| 亚洲视频在线观看网站| 亚洲国产小视频在线观看| 国产精品综合网站| 欧美小视频在线| 欧美成人四级电影| 久久夜色精品国产欧美乱极品| 亚洲欧美日韩国产综合在线| 亚洲毛片在线看| 亚洲国产成人av在线| 美女图片一区二区| 久久性色av| 久久久欧美精品| 久久国产综合精品| 午夜精品视频网站| 99成人免费视频| 亚洲裸体俱乐部裸体舞表演av| 欧美好骚综合网| 亚洲第一福利在线观看| 欧美大片在线看免费观看| 久久一区欧美| 美日韩精品视频免费看| 久热精品视频在线免费观看| 久久免费一区| 老司机精品福利视频| 免费成人性网站| 欧美成人国产va精品日本一级| 久久综合中文| 欧美国产高清| 亚洲欧洲一区二区三区久久| 亚洲国产精品一区制服丝袜| 亚洲国产天堂久久综合| 日韩视频在线你懂得| 一区二区三区免费网站| 亚洲视频axxx| 欧美一区二区三区播放老司机| 欧美一区二区啪啪| 久久婷婷综合激情| 欧美成人福利视频| 欧美日韩在线不卡| 国产精品羞羞答答xxdd| 国产真实乱子伦精品视频| 亚洲第一视频| 亚洲最新色图| 欧美亚洲综合另类| 久久综合色影院| 亚洲日本中文字幕| 亚洲一区成人| 久久婷婷综合激情| 欧美三级网页| 国模私拍视频一区| 亚洲精品中文字幕有码专区| 亚洲在线不卡| 蜜臀a∨国产成人精品| 亚洲激情午夜| 午夜精品免费| 欧美精品午夜| 国产中文一区二区| 亚洲最新在线视频| 久久久综合网站| 亚洲日本中文字幕| 久久精彩免费视频| 欧美日韩在线播放三区| 影音先锋欧美精品| 亚洲一区二区三区中文字幕在线| 久久综合中文色婷婷| 一区二区日本视频| 蜜臀av一级做a爰片久久| 国产精品激情| 亚洲精品一品区二品区三品区| 欧美在线免费观看亚洲| 亚洲国产精品va在线看黑人 | 欧美一二区视频| 欧美另类一区二区三区| 精品999网站| 亚洲免费影视第一页| 亚洲国产高清在线| 久久久国产视频91| 国产精品网站在线播放| av成人免费在线| 欧美国产精品va在线观看| 欧美一区免费视频|