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

李帥的博客

軟件開發(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>
            欧美在线一级va免费观看| 在线中文字幕不卡| 亚洲一区三区在线观看| 麻豆精品视频在线| 国产精品二区在线| 亚洲人成在线观看网站高清| 亚洲一区二区欧美| 亚洲第一区色| 欧美成人精精品一区二区频| 亚洲一区二区在线免费观看| 国产亚洲日本欧美韩国| 亚洲欧美日韩一区二区在线 | 妖精成人www高清在线观看| 久久中文字幕一区| 亚洲欧美日韩第一区| 欧美日韩在线直播| 日韩亚洲视频在线| 亚洲激情校园春色| 久久综合中文色婷婷| 国内外成人免费视频 | 日韩亚洲精品在线| 亚洲免费影视| 欧美日韩中文字幕在线视频| 亚洲视频国产视频| 亚洲激情小视频| 国产精品欧美精品| 香蕉久久一区二区不卡无毒影院| 9l国产精品久久久久麻豆| 欧美激情在线狂野欧美精品| 亚洲人成在线观看网站高清| 亚洲一区二区高清视频| 亚洲国产日韩欧美| 亚洲高清影视| 国产精品永久免费观看| 欧美一区=区| 欧美永久精品| 精品成人久久| 美女脱光内衣内裤视频久久网站| 久久亚洲精品伦理| 亚洲精品美女久久7777777| 亚洲国产欧美久久| 欧美日韩一区二区三区四区在线观看| 在线一区观看| 亚洲尤物在线| 日韩亚洲国产欧美| 久久国产88| 影音先锋久久久| 亚洲第一综合天堂另类专| 国产精品专区h在线观看| 亚洲国产老妈| 激情懂色av一区av二区av| 99视频日韩| 亚洲三级免费| 久久精品一区二区三区不卡牛牛| 影音先锋日韩精品| 99精品欧美| 最近中文字幕日韩精品 | 亚洲午夜视频在线| 国产综合网站| 亚洲视频第一页| 亚洲美女在线视频| 亚洲一区二区三区精品在线观看| 亚洲欧洲中文日韩久久av乱码| 香港成人在线视频| 在线观看视频亚洲| 亚洲一区bb| 宅男噜噜噜66一区二区| 蜜臀av性久久久久蜜臀aⅴ四虎| 久久精品亚洲精品国产欧美kt∨| 久热综合在线亚洲精品| 午夜视频一区在线观看| 久久免费少妇高潮久久精品99| 午夜影院日韩| 欧美视频在线不卡| 亚洲精品乱码久久久久久蜜桃麻豆| 国产精品第2页| 亚洲卡通欧美制服中文| 国产人妖伪娘一区91| 欧美黄免费看| 国产精品成人一区二区| 亚洲人成小说网站色在线| 亚洲第一久久影院| 亚洲最新在线| 一本高清dvd不卡在线观看| 欧美成人午夜影院| 欧美亚洲一区在线| 国产精品国产成人国产三级| 亚洲麻豆av| 一区二区av| 欧美日韩国产黄| 久久天天躁狠狠躁夜夜爽蜜月 | 亚洲一区免费| 亚洲一区日韩| 美女精品自拍一二三四| 久热精品视频在线观看| 欧美视频在线一区二区三区| 亚洲精品视频免费观看| av成人免费在线观看| 欧美激情中文字幕一区二区| 亚洲国产精品一区二区尤物区| 91久久国产精品91久久性色| 免费久久99精品国产自在现线| 亚洲综合二区| 国产精品久久久一区二区三区| 亚洲视频综合| 欧美影片第一页| 国产一区二区三区久久久久久久久| 欧美一级专区| 亚洲免费影视| 国产精品专区h在线观看| 欧美一区成人| 久久人人九九| 国产精品自拍网站| 欧美一区日韩一区| 免费成人小视频| 在线观看一区二区精品视频| 久久综合婷婷| 91久久精品国产91久久| 亚洲最新中文字幕| 国产精品美女久久久| 午夜久久电影网| 久久综合综合久久综合| 亚洲黄色三级| 欧美日韩精品免费看| 亚洲视频网在线直播| 久久av一区二区三区| 狠狠色综合网站久久久久久久| 久久一本综合频道| 亚洲欧洲视频| 亚洲免费视频网站| 国产亚洲欧美一区在线观看| 久久久久久久综合日本| 久久男人资源视频| 亚洲国产精品va在线观看黑人| 欧美中文字幕在线播放| 欧美福利一区| 亚洲国产精品999| 欧美精品999| 亚洲影院免费观看| 久久综合伊人77777蜜臀| 亚洲精品国产精品国自产观看| 欧美视频福利| 久久国内精品自在自线400部| 欧美黄色视屏| 亚洲欧美日韩国产综合精品二区| 国产亚洲在线| 麻豆精品一区二区综合av| 亚洲日本欧美在线| 欧美中文字幕视频| 亚洲啪啪91| 国产精品中文字幕欧美| 免费视频亚洲| 亚洲免费在线精品一区| 欧美成人综合| 性娇小13――14欧美| 在线看欧美日韩| 国产精品久久久久aaaa樱花 | 中文av字幕一区| 国模吧视频一区| 欧美日韩高清在线一区| 亚洲欧美资源在线| 亚洲国产清纯| 久久国产视频网| av成人国产| 韩国精品一区二区三区| 欧美日韩精品一区二区天天拍小说| 欧美一区二区黄色| 亚洲免费观看高清完整版在线观看熊 | 99re6热只有精品免费观看| 国产区日韩欧美| 欧美麻豆久久久久久中文| 一本色道久久综合狠狠躁篇怎么玩| 亚洲视频 欧洲视频| 一区在线播放| 国产精品久久久久久久久久免费看 | 亚洲国产毛片完整版 | 麻豆久久婷婷| 亚洲欧美激情四射在线日| 亚洲国产精品毛片| 久久av在线| 中文av一区特黄| 亚洲人成毛片在线播放| 国产真实精品久久二三区| 欧美日一区二区在线观看| 久久野战av| 欧美亚洲午夜视频在线观看| 99精品热视频| 亚洲高清视频的网址| 久久久xxx| 最近看过的日韩成人| 国产一区二区在线免费观看| 欧美午夜一区二区福利视频| 欧美一区二区女人| 中国成人黄色视屏| 亚洲精品国产精品国自产观看浪潮 | 久久福利毛片| 亚洲在线视频| 99精品国产热久久91蜜凸| 亚洲国产精品久久久久秋霞蜜臀| 久久久久一本一区二区青青蜜月|