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

李帥的博客

軟件開發(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 李帥 閱讀(1370) 評論(1)  編輯 收藏 引用

評論

# re: 幾道C++筆試題,不定項選擇,請高手解答分析,歡迎討論。 2011-09-21 17:55 臭美街
[url=http://www.choumeijie.com/]臭美街[/url]  回復  更多評論
  

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            亚洲午夜激情网页| 亚洲伦理在线观看| 亚洲欧美日本视频在线观看| 一区二区日韩欧美| 国产美女一区| 蜜桃av综合| 欧美另类一区| 香蕉久久夜色精品国产| 久久国产欧美精品| 亚洲精品国产系列| 在线亚洲精品| 极品尤物av久久免费看| 亚洲国内自拍| 国产精品毛片a∨一区二区三区| 欧美在线观看网站| 午夜精品久久久99热福利| 午夜精品一区二区三区在线| 伊人成人开心激情综合网| 亚洲精品久久| 国产一区二区精品在线观看| 亚洲日韩欧美一区二区在线| 国产欧美精品xxxx另类| 亚洲国产99| 国产一区二区0| 最新中文字幕一区二区三区| 国产一区二区高清不卡| 亚洲毛片在线观看.| 狠狠色丁香婷婷综合久久片| 99热免费精品在线观看| 亚洲大胆av| 午夜精品久久久久久99热软件| 亚洲国产精品久久久| 一本久久综合亚洲鲁鲁| 亚洲激情电影中文字幕| 午夜精品福利在线观看| 一区二区三区欧美亚洲| 久久久久久国产精品mv| 新片速递亚洲合集欧美合集| 欧美国产在线视频| 蜜臀a∨国产成人精品| 国产精品香蕉在线观看| 亚洲靠逼com| 亚洲二区在线| 欧美在线视频二区| 欧美一区二区三区在线播放| 欧美日韩另类视频| 亚洲国产精品欧美一二99| 狠狠久久综合婷婷不卡| 亚洲欧美中文字幕| 香蕉亚洲视频| 国产精品久久久免费| 日韩一级免费| 亚洲视频网在线直播| 欧美日韩国产不卡| 亚洲欧洲一区二区在线播放| 亚洲国产精品va在线观看黑人| 久久精品av麻豆的观看方式| 欧美在线免费视频| 国产欧美精品在线播放| 亚洲影视九九影院在线观看| 亚洲免费在线视频| 国产精品久久久免费| 99国产精品视频免费观看| 夜夜嗨av一区二区三区中文字幕| 欧美xxx成人| 亚洲人人精品| 中文国产成人精品久久一| 欧美日韩在线精品| 亚洲天堂av在线免费| 欧美亚洲在线播放| 国产午夜精品在线观看| 久久九九免费| 亚洲大片一区二区三区| 一本色道久久88综合亚洲精品ⅰ | 欧美α欧美αv大片| 亚洲国产99精品国自产| 久久综合精品国产一区二区三区| 欧美国产激情| 一区二区三区免费网站| 国产精品乱人伦中文| 午夜日韩在线| 国产精品一级在线| 久久精品日韩| 亚洲欧洲视频在线| 午夜亚洲性色福利视频| 国产亚洲精品7777| 欧美**人妖| 亚洲网站在线| 免费日本视频一区| 99精品欧美一区二区三区综合在线| 国产精品久久久久久久久免费桃花| 午夜亚洲福利| 91久久在线播放| 久久国产精品色婷婷| 亚洲三级色网| 国产色产综合产在线视频| 欧美电影专区| 午夜日韩视频| 99国产精品99久久久久久粉嫩| 久久九九99| 亚洲网站在线| 在线日韩av片| 国产日韩欧美制服另类| 欧美黄色aa电影| 久久国内精品自在自线400部| 亚洲国内欧美| 美女视频黄a大片欧美| 午夜激情一区| 99riav国产精品| 在线免费一区三区| 国产精品色午夜在线观看| 欧美精品导航| 老司机午夜精品视频| 亚洲欧美日韩一区二区| 亚洲免费高清视频| 欧美黄色一区二区| 久久欧美肥婆一二区| 午夜精品久久久久久久蜜桃app| 最新成人在线| 加勒比av一区二区| 国产欧美日韩在线视频| 国产精品成人aaaaa网站 | 亚洲毛片在线看| 欧美成人中文字幕| 久久久久久综合网天天| 欧美在线视频网站| 亚洲欧美电影在线观看| 一本色道久久综合亚洲二区三区| 亚洲高清久久久| 黑人极品videos精品欧美裸| 国产精品丝袜xxxxxxx| 欧美日韩一区综合| 欧美日韩免费高清一区色橹橹| 欧美刺激午夜性久久久久久久| 久久五月婷婷丁香社区| 久久久久国产精品人| 久久蜜桃资源一区二区老牛| 久久高清一区| 久久视频一区| 可以免费看不卡的av网站| 久久影视精品| 男女精品网站| 欧美国产日本| 欧美人与禽猛交乱配视频| 欧美日韩国产二区| 欧美视频精品一区| 国产精品免费一区豆花| 国产精品一区二区在线观看不卡 | 国产一区二区三区黄| 国产一区二区成人| 在线观看视频一区| 亚洲第一天堂av| 日韩亚洲精品电影| 亚洲一区二区视频| 欧美一区二区在线免费观看| 久久久久久**毛片大全| 裸体素人女欧美日韩| 亚洲福利免费| 亚洲午夜黄色| 久久av一区二区| 欧美成人精品h版在线观看| 欧美精品日本| 国产精品一区在线观看| 在线观看国产日韩| 99日韩精品| 欧美在线观看视频| 欧美激情久久久久久| 日韩视频免费观看高清在线视频| 亚洲免费一级电影| 久久嫩草精品久久久久| 欧美日韩精品免费观看视一区二区| 欧美午夜激情在线| 伊人久久av导航| 一区二区三区欧美激情| 久久精品九九| 一区二区亚洲精品国产| 日韩视频中文| 久久久国产亚洲精品| 91久久国产综合久久| 亚洲欧美日韩国产另类专区| 免费看黄裸体一级大秀欧美| 国产精品久久久久7777婷婷| 亚洲国产成人不卡| 久久aⅴ国产欧美74aaa| 亚洲欧洲一区二区三区久久| 久久精品人人| 国产精品一区免费视频| 亚洲毛片在线免费观看| 久久久精品免费视频| 一区二区三区视频在线观看 | 一区二区三区高清在线| 久久综合五月| 国产一区二区成人| 中文有码久久| 亚洲国产精品成人久久综合一区| 午夜在线观看欧美| 欧美视频中文在线看| 亚洲精一区二区三区| 免费在线日韩av| 欧美专区第一页|