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

李帥的博客

軟件開發(fā)愛(ài)好者

  C++博客 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
  14 隨筆 :: 3 文章 :: 4 評(píng)論 :: 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 []()

======================================================

附上我的選擇和疑問(wèn),歡迎大家指正和討論:

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) 評(píng)論(1)  編輯 收藏 引用

評(píng)論

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


只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   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>
            香蕉久久夜色精品国产| 美日韩丰满少妇在线观看| 久久国产主播精品| 亚洲一区国产视频| 欧美精品国产精品| 欧美高清在线视频观看不卡| 国产一区二区三区直播精品电影 | 亚洲女人av| 欧美日韩国产小视频| 欧美好骚综合网| 亚洲高清在线精品| 久久永久免费| 欧美69视频| 在线成人h网| 久久亚洲精品一区| 免费成人小视频| 亚洲国产成人在线| 另类酷文…触手系列精品集v1小说| 久久久精品一品道一区| 国产一区二区三区四区五区美女 | 久久久99爱| 久热精品视频在线观看一区| 黄色国产精品一区二区三区| 久久久91精品国产一区二区精品| 狼人天天伊人久久| 亚洲国产91| 欧美精品国产精品日韩精品| 亚洲精品一区二区在线观看| 亚洲午夜小视频| 国产精品久久久| 欧美一区三区二区在线观看| 久久青草久久| 91久久久久久久久| 欧美日韩国产一区二区三区地区 | 亚洲欧洲视频在线| 一区二区三区鲁丝不卡| 国产精品久久久久久亚洲调教| 亚洲在线观看视频| 美女成人午夜| 亚洲视频播放| 国内精品美女在线观看| 你懂的视频欧美| 一区二区三区精品在线| 久久精品论坛| 亚洲日本在线观看| 国产精品久久久久三级| 久久久久国产一区二区| 亚洲精品一区二区三区在线观看 | 亚洲视频在线观看| 老鸭窝亚洲一区二区三区| 亚洲精品一区在线| 国产欧美视频在线观看| 免费观看在线综合色| 在线视频欧美日韩精品| 久久久国产亚洲精品| 99视频精品在线| 国产一区二区三区av电影| 欧美肥婆在线| 欧美一区二区三区四区高清 | 久久亚洲国产成人| 亚洲特级毛片| 欧美激情一区二区三区蜜桃视频| 正在播放欧美一区| 影音先锋久久久| 国产精品成人在线| 欧美xxx在线观看| 性欧美在线看片a免费观看| 亚洲欧洲偷拍精品| 久久综合色8888| 亚洲欧美日韩在线高清直播| 亚洲黄页一区| 精品动漫一区二区| 国产精品入口夜色视频大尺度 | 欧美性片在线观看| 欧美α欧美αv大片| 欧美在线观看网站| 亚洲视频在线观看网站| 91久久精品美女高潮| 免播放器亚洲| 久久精品视频播放| 午夜精品久久久久久久久久久久久 | 欧美插天视频在线播放| 久久久999精品免费| 亚洲欧美日韩国产精品| 亚洲精品国偷自产在线99热| 国内精品视频一区| 国产色视频一区| 国产精品免费视频xxxx| 欧美午夜精品久久久久久浪潮 | 蜜桃久久av一区| 久久一区二区三区国产精品| 欧美在线视频一区二区| 午夜在线视频一区二区区别| 亚洲午夜三级在线| 亚洲影院一区| 亚洲一区二区视频在线| 亚洲一区一卡| 亚洲欧美日本国产专区一区| 亚洲无吗在线| 亚洲伊人网站| 午夜精品视频在线观看一区二区| 亚洲免费人成在线视频观看| 亚洲一区二区黄| 午夜激情综合网| 久久激情一区| 久久综合狠狠综合久久激情| 久久手机精品视频| 欧美插天视频在线播放| 美女啪啪无遮挡免费久久网站| 毛片基地黄久久久久久天堂| 美女黄网久久| 欧美日韩国产黄| 欧美午夜无遮挡| 国产模特精品视频久久久久 | 国产美女精品免费电影| 国产一区二区在线观看免费播放 | 欧美电影免费观看| 亚洲激情一区二区| 在线综合亚洲| 欧美在线观看天堂一区二区三区 | 久久久国产午夜精品| 美女国产精品| 欧美三级乱码| 国内成+人亚洲+欧美+综合在线| 尤物99国产成人精品视频| 日韩午夜电影av| 亚洲欧美卡通另类91av | 一本高清dvd不卡在线观看| 亚洲网站视频| 久久伊人亚洲| 欧美午夜欧美| 亚洲第一天堂无码专区| 亚洲天堂激情| 久久躁日日躁aaaaxxxx| 日韩视频永久免费| 久久国产精品亚洲77777| 欧美电影免费网站| 国产欧美一区二区色老头| 亚洲黑丝一区二区| 欧美一级视频| 亚洲国产精品va在线看黑人动漫| 一区二区三区色| 久久久久国产精品一区| 欧美午夜精品理论片a级按摩| 黄色av成人| 销魂美女一区二区三区视频在线| 欧美88av| 性欧美暴力猛交69hd| 欧美日本三区| 亚洲国产成人精品女人久久久 | 亚洲日本无吗高清不卡| 欧美自拍偷拍| 国产精品久久久久77777| 亚洲国语精品自产拍在线观看| 欧美一区二区三区男人的天堂| 亚洲福利视频网站| 久久爱另类一区二区小说| 欧美午夜免费电影| 亚洲精品乱码久久久久久蜜桃91 | 亚洲制服av| 欧美日韩在线播放三区四区| 亚洲第一福利社区| 久久久免费av| 午夜国产精品影院在线观看| 欧美日韩无遮挡| 亚洲美女淫视频| 欧美成人精品1314www| 久久精品伊人| 国产色综合久久| 先锋影音国产精品| 夜久久久久久| 欧美日韩在线大尺度| 亚洲精选在线观看| 亚洲国产精品久久久久秋霞蜜臀 | 久久久久久亚洲精品杨幂换脸 | 欧美激情免费观看| 久久另类ts人妖一区二区| 国产一区二区三区久久久| 欧美亚洲视频| 亚洲欧美日韩在线高清直播| 国产精品久久久久久久久婷婷 | 欧美一级黄色网| 国产欧美欧美| 久久精品91久久久久久再现| 午夜伦理片一区| 国产视频亚洲精品| 久久国产主播| 久久久久99| 亚洲福利视频一区| 亚洲国产成人午夜在线一区| 免费一区视频| 中国成人黄色视屏| 亚洲午夜一区二区三区| 国产欧美日韩精品在线| 久久久国产一区二区| 另类av一区二区| 妖精成人www高清在线观看| 日韩视频免费观看高清完整版| 欧美日一区二区在线观看 | 老司机一区二区|