C++ Programmer's Checklist


The Theoretical base is crucial for every successful programmer. It is an unwritten fact that mere mortals can't cope with the variety of concepts in C++.

Let's try to categorize important concepts every C++ programmer needs to know about.

Junior Level

Besides the fundamental things like variables, functions, arrays, it is really crucial to freely operate with pointers and references.

C++ doesn't have automatic garbage collection, which forces programmers to understand low level details about memory management. In this context, knowing pointers is a must.

For example, you should understand what the following code does:

int* ptr = new int(27); *ptr = 34; ... delete ptr;

Compared to Java/C#, a confusing moment in C++ is that variables and members of type T actually hold T objects, rather than references to T.

An important role play rvalue and lvalue variables. With the new C++ standard (C++11 and beyond), move semantics come into play, allowing to write even more efficient code.

Finally, you can't code complex projects if you are not familiar with classes and objects, object construction/destruction procedures, and similar.

Mid Level

More in-depth knowledge of Object-Oriented C++ concepts are a must, knowing how virtual functions work, what is a virtual table pointer (sometimes referred as vtable, vptr) and how would you describe the difference between static and dynamic polymorphism.

Speaking of static polymorphism, templates come to mind.

Let's take a look at this classic example of compile-time factorial calculation using templates:

template <int N> struct Factorial { enum { value = N * Factorial<N - 1>::value }; }; template <> // specialization struct Factorial<0> { enum { value = 1 }; };

Understanding the code above will speak of your good experience and level in C++.

Getting to know the templates will come naturally if you will dive deeper into the Standard Template Library, STL. You should know the differences between std::vector and std::list, and why iterators are called "random access iterators" for vectors, and "bidirectional iterators" for lists.

Senior Level

While knowing common containers and algorithms from the STL is a must for mid level C++ developers, a senior developer should also be familiar with inner details of those algorithms/containers implementations.

Here's a common C++ interview question you might encounter in your career: "why is the time complexity of std::distance() function O(n) for std::list iterators, and O(1) for std::vector iterators?"

Senior developers should understand inner details of OOP in C++, such as interface classes and the role of pure virtual functions.


Struggling to Understand Algorithm and Flowchart? Try our Notes

Want to Test Your Knowledge on Algorithm and Flowchart?


Recommended Deals End in

Online Games
Play 2048 Game Online and Relax.
Play 2048 Game Online

Search Tags

    C++ Programmers hint

    Checklist for C++ interview