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

李帥的博客

軟件開發愛好者

  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 李帥 閱讀(1378) 評論(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>
            亚洲专区一区| 亚洲欧美偷拍卡通变态| 免费观看成人www动漫视频| 欧美在线精品一区| 国产亚洲一区在线| 嫩草成人www欧美| 麻豆精品网站| 亚洲少妇自拍| 亚洲欧美在线看| 精品不卡一区| 亚洲国产一二三| 欧美日韩国产天堂| 欧美影院久久久| 久久精品免费观看| 一本色道久久综合亚洲91| 亚洲视频一区在线观看| 国产一区二区黄| 亚洲高清在线观看一区| 国产精品免费一区豆花| 久久久久久**毛片大全| 欧美成人dvd在线视频| 中文在线资源观看网站视频免费不卡 | 久久电影一区| 开元免费观看欧美电视剧网站| 日韩手机在线导航| 亚洲综合欧美| 亚洲精品欧洲精品| 欧美亚洲午夜视频在线观看| 亚洲精品久久久久久下一站| 在线亚洲欧美| 亚洲激情成人| 性色av香蕉一区二区| 日韩一区二区精品葵司在线| 亚洲一区二区三区四区中文| 最新成人在线| 欧美一区二区三区四区在线观看地址 | 午夜一级久久| 欧美激情bt| 久久亚洲欧美国产精品乐播| 欧美日韩日本国产亚洲在线| 久久综合伊人77777| 国产精品久久99| 91久久精品一区二区三区| 国产日韩欧美日韩大片| 亚洲精品综合| 91久久久国产精品| 久久久999成人| 欧美在线视频免费| 欧美成人免费一级人片100| 久久精品久久99精品久久| 国产精品theporn88| 亚洲高清三级视频| 亚洲国产一区二区精品专区| 在线不卡欧美| 久久国产日本精品| 久久精品视频免费| 国产情侣一区| 99一区二区| 亚洲一区二区高清视频| 欧美日韩亚洲综合在线| 91久久极品少妇xxxxⅹ软件| 亚洲国产99精品国自产| 久久精品国产免费| 久久久蜜桃一区二区人| 国产日韩在线看片| 欧美一区二区视频网站| 先锋资源久久| 国产欧美日韩在线播放| 性亚洲最疯狂xxxx高清| 欧美在线观看网址综合| 国产一区三区三区| 久久国产精品高清| 久久中文字幕一区| 亚洲国产精品久久久| 巨胸喷奶水www久久久免费动漫| 欧美不卡视频一区| 91久久精品久久国产性色也91| 欧美成人情趣视频| 亚洲人在线视频| 亚洲天堂av电影| 国产精品一级久久久| 欧美一级大片在线观看| 免费亚洲电影| 亚洲精品日韩在线| 国产精品久久久久久久app| 亚洲综合视频1区| 久久综合久久久| 亚洲日本一区二区三区| 欧美三级电影网| 午夜精品电影| 欧美激情精品久久久久久| 99热免费精品| 国产欧美日韩视频| 久久午夜精品一区二区| 亚洲精品乱码久久久久久按摩观| 中国日韩欧美久久久久久久久| 国产精品视频xxxx| 久久久噜噜噜久久中文字幕色伊伊| 亚洲二区免费| 欧美综合77777色婷婷| 亚洲激情成人网| 国产精品入口| 嫩草国产精品入口| 亚洲免费在线看| 亚洲福利一区| 久久精品亚洲| 亚洲最新在线视频| 激情小说另类小说亚洲欧美 | 久久久亚洲午夜电影| 亚洲日本视频| 免费观看亚洲视频大全| 亚洲一区在线直播| 亚洲日本精品国产第一区| 国产裸体写真av一区二区| 欧美激情日韩| 久久久999国产| 亚洲欧美一级二级三级| 亚洲国产欧洲综合997久久| 久久全球大尺度高清视频| 亚洲视频碰碰| 亚洲精品午夜| 亚洲国产成人在线视频| 国产欧美亚洲一区| 欧美性大战久久久久| 欧美成人一区在线| 久久久人成影片一区二区三区观看| 亚洲精品视频二区| 亚洲国产激情| 免费视频久久| 久久久精品日韩欧美| 午夜亚洲福利| 亚洲一区二区三区涩| 一本久久综合亚洲鲁鲁五月天| 在线精品视频免费观看| 国内精品久久久久久久97牛牛| 欧美视频日韩视频在线观看| 欧美紧缚bdsm在线视频| 麻豆成人小视频| 久久这里有精品15一区二区三区| 欧美在线你懂的| 午夜精品视频一区| 午夜久久久久| 亚洲国产视频一区二区| 国产日韩欧美在线看| 国产精品自拍在线| 国产日韩欧美三区| 国产日韩欧美一二三区| 国产啪精品视频| 国产主播在线一区| 极品av少妇一区二区| 亚洲电影免费观看高清完整版在线| 狠狠操狠狠色综合网| 伊人成综合网伊人222| 尤物九九久久国产精品的分类| 在线观看国产一区二区| 亚洲激情小视频| 一本色道久久综合亚洲精品不卡 | 一区二区三区欧美成人| 国产精品99久久不卡二区| 亚洲手机视频| 欧美中文字幕视频在线观看| 久久久久久亚洲精品杨幂换脸 | 亚洲在线视频| 久久成人18免费网站| 久久色中文字幕| 欧美激情在线狂野欧美精品| 亚洲美女色禁图| 亚洲综合日韩在线| 久久久久久久久久久一区| 免费日韩成人| 国产精品久久91| 狠狠色伊人亚洲综合网站色| 亚洲靠逼com| 欧美一区二区三区视频在线| 欧美freesex交免费视频| 亚洲精品资源美女情侣酒店| 午夜久久一区| 免费成人av在线看| 欧美1区2区| 亚洲一级在线| 男女av一区三区二区色多| 欧美视频在线观看免费| 激情成人中文字幕| 一区二区三区黄色| 久久蜜臀精品av| 亚洲日本成人| 久久久久国产精品一区| 欧美性色综合| 亚洲精品国精品久久99热一 | 在线成人小视频| 亚洲无线一线二线三线区别av| 久久午夜精品一区二区| 亚洲免费激情| 美女精品一区| 国产一区二区黄| 亚洲欧美日韩国产一区| 亚洲精品国产日韩| 快射av在线播放一区| 国产偷久久久精品专区| 亚洲一区观看|