After submitting my resume I was invited for a call interview, followed by a face-to-face meeting at Motorola's offices in Kraków.
There were several questions asked regarding software engineering. Looking back I would highly recommend reading books such as Scott Meyers' "Effective C++" series, McConnell's "Code Complete", Martin's "Clean Code", Reddy's "API desing for C++", or similar.
Some of the questions asked:
- write a function to reverse words in a C-like string (no stl),
- write a function which implements atoi functionality,
- what is a class invariant,
- when to use "const" for passing arguments to a function,
- what is a virtual function,
- how to handle ctor/dtor which fails,
- what is an abstract class/pure virtual fn,
- what is a mixin,
- whan it could occur that the function would not return to the place from it was called (hint: stack corruption),
- what is a virtual dtor and why/when would you need it,
- smart pointers, which do you know and what are they for,
- c++ storage specifiers,
- what can be the "static" keyword used for,
- what is the anonymous namespace and what is it used for,
- what is a reference, can you assign r-value reference,
- how are post and pre incrementation operators differentiated, write sample implementations of both of them for a general type,
- what is a template method,
- what is stack unwinding,
- what are the access specifiers for a class,
- what is a difference between class and struct,
- can you think of an example when your program would crash without reaching a main function,
- how can you tell which shell are you running ona UNIX system,
- write a function to reverse elements in a single-linked list,
- explain different cast operators in c++,
- is using global variables a good programming practice, does the same apply to singleton,
- name two sort algorithms, assess their complexity,
- what is a deadlock,
- some pointer arithmetics problems,
- variations on constness of pointers and types to which they point to,
- what is a null object,
- what is a pimpl idiom,
- write a sample interface class, are the ctor/dtor mandatory, what will be the access specifiers for members in the interface class and the derived class which will contain the implementation,
- design patterns (bridge, facade, proxy, visitor, chain of responsibility, factory method, abstract factory, ...)
- what synchronization objects do you know which can be used in a multithreaded environment,