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

李帥的博客

軟件開發愛好者

  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>
            亚洲欧美国产制服动漫| 欧美成人有码| 亚洲一区二区免费在线| 欧美午夜精品一区二区三区| 亚洲色图制服丝袜| 亚洲神马久久| 国产亚洲毛片在线| 久久综合福利| 欧美久久婷婷综合色| 亚洲午夜精品久久久久久app| 亚洲天堂成人在线观看| 国产一区二区久久久| 欧美大色视频| 国产精品国产三级国产普通话99 | 国产欧美午夜| 美女视频黄 久久| 欧美福利精品| 香蕉久久一区二区不卡无毒影院| 欧美一区在线直播| 日韩一区二区精品葵司在线| 一区二区三区精品久久久| 国产一区二区三区成人欧美日韩在线观看| 久久一区二区三区四区| 欧美高清自拍一区| 欧美中文在线免费| 欧美激情免费在线| 久久精品一二三区| 欧美日韩亚洲一区二区三区| 久久久久91| 欧美日韩三级| 欧美成人激情视频| 国产精品视频久久| 亚洲国产婷婷| 国产日韩欧美亚洲| 99亚洲伊人久久精品影院红桃| 国产揄拍国内精品对白| 99在线精品视频在线观看| 伊甸园精品99久久久久久| 亚洲最新中文字幕| 亚洲人久久久| 久久久久久久久久久久久久一区| 亚洲午夜免费视频| 欧美高清视频一区二区三区在线观看| 欧美一区二区三区免费在线看| 欧美护士18xxxxhd| 嫩草影视亚洲| 国产一区视频网站| 亚洲免费一区二区| 中文亚洲免费| 欧美精品一区二区在线观看| 母乳一区在线观看| 今天的高清视频免费播放成人| 亚洲午夜一区二区三区| 亚洲视频大全| 欧美理论电影在线观看| 欧美韩日亚洲| 亚洲高清自拍| 免费日韩成人| 欧美成人午夜激情| 亚洲电影在线免费观看| 久久精品72免费观看| 久久精品免费观看| 国产亚洲毛片在线| 亚洲欧美日韩天堂| 久久av一区二区| 国产亚洲一区二区三区在线观看| 亚洲永久免费av| 性色av一区二区三区| 国产精品欧美日韩久久| 亚洲一区视频| 久久久国产一区二区| 狠狠久久亚洲欧美| 久久久噜噜噜久久久| 免费不卡视频| 亚洲精品中文字| 欧美日韩在线观看一区二区三区| 亚洲美女黄网| 午夜伦欧美伦电影理论片| 国产欧美一区二区精品忘忧草 | 久久综合精品国产一区二区三区| 国产欧美在线播放| 久久国产毛片| 欧美激情一区二区久久久| 亚洲乱码一区二区| 欧美视频在线播放| 欧美影院精品一区| 亚洲国产精品免费| 亚洲图片欧美日产| 国产一区亚洲| 欧美乱人伦中文字幕在线| 一区二区三区精品| 开元免费观看欧美电视剧网站| 在线精品视频一区二区三四| 欧美激情久久久久久| 亚洲性色视频| 欧美激情亚洲自拍| 午夜日韩视频| 亚洲人成网在线播放| 国产精品久久久久三级| 久久精品最新地址| 99亚洲一区二区| 久久永久免费| 亚洲欧美国产一区二区三区| 国产在线视频欧美| 欧美日韩一二三四五区| 欧美在线观看网站| av不卡在线| 欧美黄色一区| 欧美在线黄色| 在线视频精品一| 在线视频国产日韩| 国产偷国产偷亚洲高清97cao| 欧美成人一区二区三区在线观看 | 欧美日韩亚洲一区二区三区在线观看| av成人免费在线观看| 久久亚洲图片| 亚洲综合色自拍一区| 亚洲国产日韩在线一区模特| 国产精品福利在线观看网址| 免费在线日韩av| 欧美一区免费视频| 日韩亚洲欧美一区| 亚洲国产一二三| 免费欧美日韩国产三级电影| 亚洲在线日韩| 一区二区91| 亚洲另类一区二区| 在线免费观看日本一区| 国产性天天综合网| 国产精品资源| 国产精品久久国产愉拍| 欧美日韩999| 欧美成人在线影院| 欧美ed2k| 欧美激情精品| 欧美福利在线观看| 欧美电影免费网站| 男女激情视频一区| 免费精品视频| 欧美激情第3页| 欧美国产激情| 欧美激情五月| 欧美日本一区二区高清播放视频| 另类亚洲自拍| 欧美电影打屁股sp| 欧美精品国产精品日韩精品| 欧美高清视频www夜色资源网| 牛牛国产精品| 欧美日韩国产一级片| 欧美老女人xx| 国产精品国产三级国产专区53| 国产精品hd| 国产日韩欧美制服另类| 黑人巨大精品欧美黑白配亚洲| 国产在线精品成人一区二区三区| 国产综合久久| 亚洲人成久久| 国产精品99久久久久久久久久久久 | 久久综合国产精品台湾中文娱乐网| 久久se精品一区精品二区| 久久精品欧洲| 欧美va亚洲va日韩∨a综合色| 欧美精品国产精品| 国产精品免费视频xxxx| 国产日韩视频| 亚洲黄色精品| 亚洲欧美激情视频在线观看一区二区三区 | 国产亚洲成av人在线观看导航| 国产在线欧美日韩| 亚洲欧洲另类| 午夜伦理片一区| 久久综合中文字幕| 亚洲人成免费| 亚洲欧美在线观看| 免费国产一区二区| 国产精品日韩一区二区| 极品av少妇一区二区| 日韩午夜免费| 久久久99国产精品免费| 亚洲国产成人91精品| 亚洲一区久久久| 免费成人高清在线视频| 国产精品热久久久久夜色精品三区| 韩日视频一区| 亚洲一区二区三区欧美| 女同一区二区| 亚洲男人的天堂在线| 欧美成人69av| 国产欧美一二三区| 亚洲视频在线观看一区| 毛片精品免费在线观看| 一区二区三区免费网站| 久久夜色精品国产欧美乱极品| 国产精品久久久久久久免费软件| 在线播放日韩专区| 欧美在线免费视屏| 亚洲靠逼com| 另类亚洲自拍| 国内偷自视频区视频综合| 亚洲免费在线视频一区 二区|