The list of Potential Questions that may be asked during the interview for C++ Developer Position.

  • Please explain the difference between concepts of virtual function and virtual inheritance.
  • Please explain, how differ the global static functions from the static functions, members of the classes?
  • What is in common and what is usually the difference between realization of the copying constructs, initialization and overloaded assignment operation?
  • Please compare 2 methods of overload of operations: as a method of the class and as an external friend-function.
  • How is it possible to create virtual constructors and a destructor within a class?
  • Can the template class be abstract? Why?
  • What is the specificity of the overload of the operations "sizeof", "typeid", "new" и "delete"? What is it caused by?
  • Please compare specifics of overload of the operations "()" and "[]".
  • Please provide a detailed comparison of work with lines in style С (char*) and С++ (string).
  • Please provide amplified comparison of work with dynamic memory in С and С++.
  • Please amplify comparison of standard means of input-output in С and С++.
  • What does operator “throw” mean without a parameter?
  • Please tell, what kind of iterators there could be and how do they differ?
  • What is the difference between modifiers “register”, “const” and “volatile”?
  • How should the function be written that takes earlier unknown number of arguments?
  • What is the difference between constructs "extern" and "extern "C""?
  • What is the difference between using and include within the traditional С++?
  • Please compare using macros, inline-functions and template-functions.
  • How should one correctly organize non-trivial sorting our by means of standard libraries С and С++ (please compare the methods)?
  • Please tell what and how should it be done so that objects of the written classes by you are possible to insert into “cout” and read from “cin”?
  • Please compare different forms of operations of giving type (in С style and in С++ style). Please tell about the overload of these operations.
  • Each class has some special member-functions calling which may be inserted by a compiler into the code without a clear programmer’s direction. Please enumerate such functions, members and cases, when such unclear calls may emerge.
  • How should one assign value to the arguments of functions by default? What are the merits and demerits of using such a possibility in С++? What are its alternatives?
  • While writing operator “catch” we can write as its type of argument directly the type of exception, pointer to the type of exception or a link to the type of exception. Please compare such approaches.
  • In what order are the function’s arguments calculated at its calling: left to right, right to left or any other way possible? E.g. what order will the arguments’ calculation be in the next example: f(5+I, ++I); ?
  • If, at the creation of a variable a programmer did not clearly initialize it, then in come cases, compiler will assign it with some earlier known initial value, and in some cases initial value will be unpredictable. What does it depend on?
  • What does the order of creation (sequence of calling constructs) of global variables? What are the practical conclusions form this?
  • There is such a code: f(){return 3.5;} ... double d = f() What is the value of “d” ? Why?
  • Please explain the difference between the concepts "anonymous namespace " and "anonymous enumeration".
  • What will happen if the exception will be thrown within a construct?
  • What is specialization of templates and what it is used for?
  • What is the specifics of using “delete” operation to the pointers on the functions?
  • What is “this” and how is it used?
  • What is “forward declaration” of classes? What is it used for?
  • What are the directives of the pre-processor that are usually used for preventing of repetitive inclusion of the header file?
  • What are the constructs for organization of branching does С++ provide the programmers with?
  • What are the constructs for organization of cycles as provides by С++ for programmer?
  • What is polymorphism? What constructs present in С++ allow stating that this language supports polymorphism?
  • What is “lvalue”?
  • What the key word “finally” is used for in C++?
  • Please compare operators “continue” and “break”.
  • What are the “trigraphs” and what are they used for?
  • What is different and general is there in the specificity of overload of constructs and destructors?
  • What is anonymous uniting and what is it used for?
  • Is it possible in С++ (if yes, then how) to write such a class which is impossible to inherit from any other class?
  • Two classes are given, one of which is inheriting from the other. Please write down how should constructs f copying and initialization for these classes work (please provide an example).
  • What is the specifics of the operations of || and && ? What is the specifics of overload of these operations?
  • Please compare concepts of "static variable" and "static variable – member of the class".
  • What is the danger of using macroses? Please supply examples.
  • Compare operators “throw” and “return”.
  • How should one initialize a variable that is a private static member of class?
  • What is class “auto_ptr” and what is it used for?