C++ hands you decisions that other languages make for you: whether a value is copied or shared, where an object lives, and when it is destroyed. The C++ (Basic) test checks that you understand those decisions as they appear in small, complete programs — the kind you write in a first course or while practising problems — and that you can then write a correct solution in C++.
Most multiple-choice questions show a short program, #include lines and main included, and ask what it prints. Others show a few lines and ask whether they compile, or which of several statements does a particular job. A few ask you to select every correct option, and only the exact set scores. After that, the coding section gives you a problem to solve in C++, judged on hidden test cases.
Who Basic suits
Sit Basic if you have written C++ for a few months and use std::vector and std::string without looking anything up, can write a class with a constructor, and know when a function receives a copy and when it receives the caller's object. That is typically where a first C++ course, or a few months of solving practice problems in C++, leaves you. If you already write your own templates, think in terms of ownership and moves, and can name the common kinds of undefined behaviour, the C++ (Intermediate) test will tell you more.
Coming from C? The arithmetic and pointer questions will feel familiar, but most of the paper is about what C does not have — references, classes, inheritance, const member functions and the standard library — so spend your preparation there.
The paper, topic by topic
Each topic appears on your result by name, with a link to practise it. The C++ study plan teaches every one of them.
- Types and basics. Integer and floating-point arithmetic and the conversions between them, what is lost when a value changes type, integer division and remainder, signed and unsigned values in one expression, and
charandboolbehaving as small integers. - Pointers and references. Taking addresses and dereferencing, pointer arithmetic over an array, pointers to pointers, references as aliases, the three ways to pass an argument, and
nullptr. - Classes and constructors. Constructors and member initialiser lists, when the compiler provides a constructor and when it does not, copying,
staticmembers,publicandprivate, and exactly when each object is destroyed. - Inheritance and virtual functions. The order of construction and destruction in a hierarchy,
virtualandoverride, calls through base-class pointers and references,protectedaccess, and object slicing. constand references. A pointer toconstversus aconstpointer,constobjects andconstmember functions, and what aconstreference is allowed to bind to.- Memory and RAII.
newanddeleteand their array forms, leaks and dangling pointers, andstd::unique_ptras the way to have an object released automatically at the end of a scope. - STL containers.
vector,string,mapandset: building them, inserting, erasing and looking up, which order each keeps its elements in, and checked versus unchecked element access. For strings, searching and slicing withfindandsubstrcovers thenpostest the paper likes. - STL algorithms and iterators.
sort,find,accumulate,max_elementand their relatives, half-open iterator ranges, and whatend()refers to. - Modern C++.
auto, range-basedforloops by value and by reference, and brace initialisation. Two lessons teach exactly this: the range-based for loop andconst,constexprandauto.
Small programs, compiled and compared
Test rules rather than rereading them. Write a ten-line program that tests one rule, predict its output, compile it and compare. Two habits make this faster. Give a throwaway class a constructor and a destructor that each print a letter, and you can watch every object's lifetime as the program runs. And compile with warnings switched on (-Wall -Wextra): many classic C++ mistakes are ones a compiler warns about but still accepts, and a warning you have seen once is a trap you will recognise on the page.
The C++ study plan modules that match this test are Fundamental types; Arrays, pointers and references; Memory, ownership and RAII; Classes and objects; Inheritance and polymorphism; STL containers; and Algorithms and lambdas. Their exercises compile and run on a judge, which makes them the same kind of practice as the test.
For the coding section, solve easy problems in C++ from Arrays, Strings and Sorting, with the roadmap lessons on arrays and sorting algorithms for the techniques behind them. In the sitting, the whole standard library is already included and you complete a single function: array arguments arrive as references to vectors, and you return the answer instead of printing it. Use long long for a running total that can outgrow int. Pasting is off during a sitting, so practise typing solutions from an empty function. Run checks the visible examples, and Submit scores every hidden case, with partial credit for each one passed.
Beyond Basic
Basic stops short of three subjects the C++ (Intermediate) test treats as topics of their own: templates you write yourself, move semantics, and undefined behaviour. Basic still expects you to notice when a beginner's program has gone wrong — a few right answers here are "it does not compile" or "the behaviour is undefined" — but Intermediate asks why, and adds shared ownership with std::shared_ptr, iterator invalidation, the rules the STL sets for comparators, and newer parts of the language such as lambdas, std::optional and structured bindings. Its coding section reaches medium difficulty.