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

李帥的博客

軟件開發愛好者

  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 李帥 閱讀(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>
            欧美激情一区二区三区全黄 | 亚洲一区二区高清视频| 亚洲成人在线视频网站| 99精品欧美一区二区三区| 欧美顶级大胆免费视频| 男同欧美伦乱| 亚洲激情小视频| 亚洲国产导航| 国产精品久久7| 欧美一区二区久久久| 欧美一区二区三区久久精品茉莉花 | 欧美日韩1080p| 午夜精品久久久| 欧美在线观看视频在线| 1769国产精品| 亚洲精品欧美日韩专区| 国产精品网站视频| 欧美a级一区| 欧美另类高清视频在线| 欧美亚洲一区在线| 久久精品五月| 亚洲视频一区在线观看| 午夜在线视频观看日韩17c| 伊人久久久大香线蕉综合直播| 亚洲国产另类久久精品| 欧美一区二区三区视频在线 | 国内视频一区| 亚洲大片av| 国产日韩欧美高清免费| 牛人盗摄一区二区三区视频| 欧美系列一区| 欧美激情一区二区三区四区| 国产美女精品视频| 亚洲人成77777在线观看网| 国产色产综合产在线视频| 亚洲精品裸体| 在线看国产日韩| 午夜久久久久久| 在线亚洲欧美| 欧美二区在线看| 久久亚洲二区| 国产欧美日韩一区二区三区在线观看 | 久久久www成人免费毛片麻豆| 欧美激情综合在线| 久久久天天操| 国产欧美综合在线| 亚洲视频在线二区| 夜夜夜精品看看| 欧美福利影院| 欧美高清日韩| 亚洲国产欧美一区二区三区久久 | 欧美亚洲免费在线| 亚洲欧美综合国产精品一区| 欧美日韩精品是欧美日韩精品| 欧美高清在线观看| 国外成人在线视频网站| 欧美亚洲在线播放| 欧美伊人久久| 国产视频精品va久久久久久| 亚洲一区二区日本| 性娇小13――14欧美| 国产精品成人观看视频国产奇米| 亚洲人在线视频| 一本色道久久加勒比88综合| 欧美精品18videos性欧美| 欧美激情自拍| 999在线观看精品免费不卡网站| 免费观看日韩| 亚洲国产日韩在线一区模特| 亚洲精品一品区二品区三品区| 欧美大片第1页| 亚洲激情偷拍| 亚洲一级高清| 国产日韩欧美精品| 久久精品亚洲热| 欧美激情影院| 亚洲图片欧洲图片日韩av| 国产精品日日做人人爱 | 亚洲高清资源| 亚洲婷婷综合色高清在线| 国产精品久久久久永久免费观看| 亚洲在线播放电影| 久久亚洲国产精品一区二区| 亚洲二区在线| 欧美日韩一区二区视频在线| 亚洲亚洲精品在线观看| 久久综合伊人77777蜜臀| 亚洲三级视频在线观看| 欧美午夜电影一区| 久久精品日产第一区二区| 亚洲第一区在线| 性欧美大战久久久久久久久| 1769国内精品视频在线播放| 欧美激情四色| 久久国产精品色婷婷| 亚洲精品久久久久中文字幕欢迎你| 亚洲欧美区自拍先锋| **性色生活片久久毛片| 欧美色123| 美女999久久久精品视频| 夜夜嗨av色一区二区不卡| 久久久精彩视频| 亚洲视频一二区| 在线观看欧美黄色| 国产精品草草| 欧美成年人视频网站欧美| 午夜伦欧美伦电影理论片| 亚洲片在线资源| 久久久久9999亚洲精品| 日韩午夜精品| 一区二区三区在线高清| 亚洲欧美日韩精品综合在线观看| 男人天堂欧美日韩| 欧美亚洲午夜视频在线观看| 亚洲毛片在线看| 精东粉嫩av免费一区二区三区| 国产精品vip| 欧美精品久久99| 免费日韩av| 久久精品国产第一区二区三区最新章节 | 欧美电影资源| 久久蜜桃香蕉精品一区二区三区| 国产精品99久久不卡二区| 国内一区二区在线视频观看| 国产欧美 在线欧美| 欧美日韩一二区| 欧美成人一区在线| 老巨人导航500精品| 久久av资源网| 欧美在线三区| 午夜精彩视频在线观看不卡| 一区二区三区高清视频在线观看| 亚洲国产老妈| 亚洲大片在线| 亚洲韩国青草视频| 欧美激情一二三区| 欧美激情一区二区| 亚洲国产欧美在线人成| 欧美激情在线| 亚洲人妖在线| 一区二区免费在线播放| 一区二区日韩| 亚洲一区二区在线免费观看| 亚洲一级电影| 欧美在线影院在线视频| 久久超碰97人人做人人爱| 久久狠狠婷婷| 久久综合色天天久久综合图片| 久久综合久色欧美综合狠狠| 欧美插天视频在线播放| 欧美精品不卡| 国产精品久久激情| 国产日韩精品在线| 亚洲丰满在线| 一本色道久久精品| 欧美一区二区三区在线播放| 久久视频国产精品免费视频在线| 久久久久久亚洲精品中文字幕| 另类av一区二区| 亚洲国产视频a| 中文精品一区二区三区| 欧美一区二区福利在线| 久久综合伊人| 欧美日韩国产色视频| 国产模特精品视频久久久久| 一区精品久久| 一本色道久久综合亚洲精品小说| 午夜久久久久| 欧美福利精品| 亚洲天堂av综合网| 久久先锋资源| 国产精品劲爆视频| 在线电影一区| 亚洲一区高清| 欧美成人一区二区在线| 亚洲影院在线观看| 久久一区二区视频| 国产精品麻豆成人av电影艾秋| 伊人春色精品| 亚洲欧美影音先锋| 亚洲大片精品永久免费| 午夜视频精品| 欧美日本久久| 在线观看日韩专区| 亚洲欧美美女| 亚洲丰满少妇videoshd| 欧美亚洲网站| 欧美视频一区二区三区| 91久久在线观看| 久久精品国内一区二区三区| 日韩午夜激情电影| 久久综合伊人77777尤物| 国产日韩欧美一区二区三区在线观看 | 久久久久这里只有精品| 国产精品久久久一区二区| 亚洲裸体在线观看| 免费欧美视频| 久久国产精品久久w女人spa| 国产精品社区| 午夜精品亚洲|