C ++ classic interview questions (verify your C ++ level)

Source: Internet
Author: User
1. Introduce STL and explain in detail how STL implements vector.
4. What are the differences between pointer and reference? If it is safer to pass a reference than to pass a pointer, why? Isn't it true if I use a constant pointer?
5. There are several ways to pass parameters. What method is used to implement multi-state parameter transfer, and what is the cause if no method is used;
6. Use a project to describe how to apply the design pattern.
7. Introduce your understanding of the design model. (Many detailed questions are randomly asked in this process)
8. What are the definitions of C ++ and C.
9. Can the constructor be a virtual sweat volume? Why? Can destructor be purely virtual?
10. Problems Related to the copy constructor, such as deep copy, shortest copy, and temporary objects.
11. use UML to describe a project that you think can better reflect the idea of OOP. (It is best for this project to be inherited, multi-state, and virtual functions all reflect.) This problem may take about half of the interview time, and many questions will be asked, which may be asked accidentally ).
12. The base class has a virtual function. Do the subclass need to be declared as virtual? Why.
13. C can also be reused by carefully Encapsulating some function functions. What are the advantages of C ++ classes.
14. What are the characteristics of C ++ and how to implement polymorphism? Draw the relationships between base classes and child classes in the memory.
15. Why should abstract base classes and pure virtual functions be introduced?
16. Introduce the template and package container. How to implement it? (You may be expected to implement it on the spot)
17. How do you understand MVC. A simple example is provided to describe its application.
18. How to eliminate the ambiguity of Multi-inheritance.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.