SEMAN

曾经沧海难为水、除却巫山不是云

C++博客 首页 新随笔 联系 聚合 管理
  9 Posts :: 3 Stories :: 24 Comments :: 0 Trackbacks

C++ Questions

  • What are the major differences between C and C++?
    • What are the differences between new and malloc?
    • What is the difference between delete and delete[]?
    • What are the differences between a struct in C and in C++?
    • What are the advantages/disadvantages of using #define?
    • What are the advantages/disadvantages of using inline and const?
  • What is the difference between a pointer and a reference?
    • When would you use a pointer? A reference?
    • What does it mean to take the address of a reference?
  • What does it mean to declare a function or variable as static?
  • What is the order of initalization for data?
  • What is name mangling/name decoration?
    • What kind of problems does name mangling cause?
    • How do you work around them?
  • What is a class?
    • What are the differences between a struct and a class in C++?
    • What is the difference between public, private, and protected access?
    • For class CFoo { }; what default methods will the compiler generate for you>?
    • How can you force the compiler to not generate them?
    • What is the purpose of a constructor? Destructor?
    • What is a constructor initializer list?
    • When must you use a constructor initializer list?
    • What is a:
      • Constructor?
      • Destructor?
      • Default constructor?
      • Copy constructor?
      • Conversion constructor?
    • What does it mean to declare a...
      • member function as virtual?
      • member function as static?
      • member function as static?
      • member variable as static?
      • destructor as static?
    • Can you explain the term "resource acquisition is initialization?"
    • What is a "pure virtual" member function?
    • What is the difference between public, private, and protected inheritance?
    • What is virtual inheritance?
    • What is placement new?
    • What is the difference between operator new and the new operator?
  • What is exception handling?
    • Explain what happens when an exception is thrown in C++.
    • What happens if an exception is not caught?
    • What happens if an exception is throws from an object's constructor?
    • What happens if an exception is throws from an object's destructor?
    • What are the costs and benefits of using exceptions?
    • When would you choose to return an error code rather than throw an exception?
  • What is a template?
  • What is partial specialization or template specialization?
  • How can you force instantiation of a template?
  • What is an iterator?
  • What is an algorithm (in terms of the STL/C++ standard library)?
  • What is std::auto_ptr?
  • What is wrong with this statement? std::auto_ptr ptr(new char[10]);
  • It is possible to build a C++ compiler on top of a C compiler. How would you do this? (Note: I've only asked this question once; and yes, he understood that I was asking him how cfront was put together. We hired him.)

暂时发布问题,大家集思广益,争取把每个问题讨论的充分一点,我会在最快的时间给我出的答案:)

posted on 2005-11-27 17:04 味全每日C++ 阅读(2187) 评论(1)  编辑 收藏 引用 所属分类: C/C++ BASIC

Feedback

# re: Good C++ Interview Questions 2012-05-26 22:52 Mingyu
what's the answer?  回复  更多评论
  


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理