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

李帥的博客

軟件開發愛好者

  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 李帥 閱讀(1372) 評論(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>
            美女精品一区| 亚洲国产婷婷香蕉久久久久久99 | 欧美一区二区三区啪啪| 99re热精品| 一区二区三区日韩欧美精品| 亚洲美女视频在线免费观看| 亚洲系列中文字幕| 欧美在线免费播放| 免费在线成人av| 亚洲人成在线观看一区二区| 亚洲一级黄色片| 99精品视频免费观看| 一本不卡影院| 亚洲婷婷在线| 欧美在线黄色| 亚洲人成网站在线观看播放| 亚洲综合色婷婷| 久久婷婷色综合| 国产精品草草| 亚洲黄色av| 欧美诱惑福利视频| 亚洲国产成人精品久久| 亚洲一区二三| 欧美gay视频激情| 国产日韩专区在线| 99精品国产在热久久婷婷| 久久久久国色av免费观看性色| 欧美好吊妞视频| 亚洲欧美综合国产精品一区| 欧美成人久久| 狠狠色伊人亚洲综合成人| 亚洲视频网站在线观看| 免费久久久一本精品久久区| 亚洲综合激情| 欧美日韩视频| 最新亚洲激情| 久久夜色精品国产欧美乱| 亚洲午夜激情网页| 欧美日本亚洲视频| 亚洲欧洲日本mm| 欧美成年网站| 久久电影一区| 国产亚洲激情在线| 亚洲欧美日韩国产一区| 亚洲精品黄色| 欧美黄色大片网站| 亚洲国产天堂网精品网站| 久久精品导航| 午夜在线一区| 国产婷婷一区二区| 欧美一区1区三区3区公司| 日韩一级精品| 欧美三级电影一区| 在线亚洲欧美视频| 亚洲免费电影在线观看| 欧美顶级少妇做爰| 91久久中文| 亚洲精品乱码久久久久久| 欧美岛国激情| 一个色综合av| 亚洲精品视频在线播放| 欧美日韩国产综合新一区| 亚洲美洲欧洲综合国产一区| 亚洲国产另类精品专区| 欧美成人福利视频| 亚洲精品四区| 一区二区精品在线| 国产精品久久久久影院亚瑟| 亚洲欧美区自拍先锋| 国产欧美日韩另类视频免费观看 | 免费欧美日韩| 久久精品综合网| 1769国内精品视频在线播放| 欧美顶级大胆免费视频| 免费欧美日韩| 亚洲视频二区| 香蕉久久夜色精品国产使用方法| 国产精品五区| 免费亚洲视频| 国产精品99一区二区| 久久国产天堂福利天堂| 久久久国产一区二区| 99视频在线精品国自产拍免费观看| 日韩一级精品| 在线观看国产欧美| 亚洲免费高清| 经典三级久久| 妖精成人www高清在线观看| 国产三级欧美三级| 亚洲电影一级黄| 国产精品青草久久久久福利99| 久久综合色88| 欧美涩涩网站| 狼狼综合久久久久综合网| 欧美激情影音先锋| 久久精品中文| 欧美日韩影院| 欧美电影在线观看| 国产欧美日韩另类视频免费观看| 亚洲第一二三四五区| 国产精品一区二区久久久| 欧美激情综合| 国产综合色精品一区二区三区| 亚洲黄色性网站| 国产一区在线免费观看| 99精品视频网| 亚洲国产欧美一区| 性做久久久久久久免费看| 一区二区精品| 欧美精品久久一区二区| 久久女同互慰一区二区三区| 欧美视频四区| 亚洲国产视频一区| 亚洲国产乱码最新视频| 午夜一区在线| 小黄鸭精品密入口导航| 欧美日韩国产成人高清视频| 欧美成人嫩草网站| 国内免费精品永久在线视频| 亚洲一区二区三区欧美| 亚洲午夜极品| 欧美日韩中文字幕在线视频| 亚洲成色www8888| 影音先锋久久资源网| 久久精品免费播放| 久久免费的精品国产v∧| 国产伦精品一区二区三区免费 | 国产欧美 在线欧美| 亚洲最新视频在线| 亚洲国产精品热久久| 久久九九精品| 久久久青草婷婷精品综合日韩| 欧美视频中文一区二区三区在线观看| 男女精品网站| 亚洲国产成人在线| 免费看亚洲片| 亚洲国产成人精品久久| 亚洲国产黄色片| 欧美成年人视频| 亚洲激情校园春色| 日韩西西人体444www| 欧美精品一区二区在线播放| 亚洲经典自拍| 中文在线资源观看视频网站免费不卡| 欧美黑人多人双交| 亚洲伦理一区| 午夜在线不卡| 国产亚洲制服色| 久久女同精品一区二区| 欧美福利一区二区三区| 亚洲精品日韩在线| 欧美日韩视频在线| 亚洲在线播放电影| 久久亚洲一区二区| 亚洲精品视频一区| 国产精品视频久久| 欧美影院久久久| 亚洲第一天堂av| 亚洲女同在线| 在线播放亚洲一区| 欧美日韩视频免费播放| 欧美专区在线| 亚洲精品午夜| 麻豆精品一区二区av白丝在线| 亚洲精品久久久久久久久久久久久| 欧美日韩另类丝袜其他| 午夜精品国产| 亚洲激情在线观看| 久久高清福利视频| 99国产精品久久久久老师| 国产精一区二区三区| 欧美freesex8一10精品| 亚洲欧美日韩成人| 91久久久久久| 久久久综合网站| 亚洲天堂av在线免费| 精品动漫av| 国产伦精品一区二区三区视频孕妇| 裸体丰满少妇做受久久99精品| 中文在线不卡视频| 亚洲第一免费播放区| 久久福利视频导航| 一区二区欧美日韩| 在线视频国产日韩| 国产女同一区二区| 欧美日韩亚洲一区在线观看| 久久久亚洲高清| 午夜精品久久久久影视 | 欧美中文日韩| 亚洲免费久久| 在线精品观看| 国产欧美日韩在线视频| 欧美日韩高清在线观看| 久久一区中文字幕| 欧美一区二区在线视频| 亚洲视频欧洲视频| 9色精品在线| 亚洲美女av在线播放| 亚洲电影在线观看| 欧美电影在线观看|