CPA-21-02 Verified 2026 Edition

Cpa – C++ Certified Associate Programmer Practice Test

CPA - C++ Certified Associate Programmer (CPA-21-02) is an associate-level credential for developers who have completed entry-level C++ training. It builds on the CPE Certified Entry-Level Programmer exam and basic object-oriented programming knowledge. Types and operators, control flow, functions, pointers, and classes and namespaces are the main areas of the practice test.

275 Total Questions
1 Included Version Get all versions for the price of one
English Edition
$65k–$110k Typical Salary An estimate of yearly pay in the United States for junior C++ developers, software developers and embedded software engineers.
All-In-One Bundle
$79.99
$75.99
  • Interactive Simulator & AI
  • Detailed Explanations
  • Study, Timed & Flashcard Mode
  • Lifetime Access & Updates

Instant lifetime access • Secure checkout

Why Study with PlanetCert?

The Latest Questions

Practice questions and exam topics aligned with the current exam objectives.

Detailed Explanations

Go beyond the answer. Master the material with comprehensive learning and professional explanations for every concept.

AI

AI-Powered Insights

Personalized preparation guidance that adapts to your performance and identifies weak spots automatically.

Exam Information

Official specifications published by C++ Institute

Exam Format

65 min
40
70%
Associate

Registration

$345 USD
Pearson VUE or online proctoring
English

Validity

lifetime

Skills this practice test covers

  • Work out the value of an expression from operator precedence, associativity and promotion.
  • Trace loops and switch statements, including fall-through and continue.
  • Catch exceptions by type, and with a catch-all handler.
  • Choose between passing an argument by value, by reference and by pointer.
  • Manage dynamic memory with new, delete and delete[] without leaks.
  • Build class hierarchies with constructors, virtual functions and access control.

Explore related topics

CPA-21-02 exam content

5 domains · 35 topics · 271 of 275 questions sorted by domain

Types & Operators24.5%67 questions

This domain covers the building blocks of every expression: the standard types and their ranges, literals, strings, aggregates, operators and conversions. Small details, such as precedence, promotion or the base of a literal, decide the value of an expression.

Skills tested

  • Evaluate expressions with arithmetic, bitwise, logical and short-circuit operators.
  • Read literals in decimal, octal, hexadecimal and binary form.
  • Work with std::string methods such as compare(), size(), substr() and insert().
  • Declare and use vectors, arrays, structures, unions and enums.
  • Predict the result of type conversion, casting, promotion and sizeof.

Official topics

  • Apply unary, binary, and ternary operators
  • Operator usage
  • Ternary conditional operator
  • Data types and representations
  • Literals
  • String operations
  • Aggregates
  • Type conversions
  • Declaration modifiers
Control & Exceptions18%42 questions

This domain covers how a program moves from one statement to the next, and what happens when something fails. Candidates trace if, switch and loop statements, including break, continue and goto, and handle errors with try, catch and throw.

Skills tested

  • Trace while, do-while and for loops that use break and continue.
  • Predict switch fall-through when a case has no break.
  • Throw and catch exceptions, including with a catch-all handler.
  • Recognize exception hierarchies and the throw() specifier in a function declaration.

Official topics

  • Control flow statements
  • Multiple-selection constructs
  • Return statement
  • Exception handling
  • Exception hierarchies
Functions & Preprocessor Directives17.5%52 questions

This domain covers how functions are declared, called and overloaded, and what the preprocessor does before compilation. Candidates pass arguments in three ways, write recursive functions, and predict how macros expand.

Skills tested

  • Pass arguments by value, by reference and by pointer, and predict the effect of each.
  • Overload functions and set default parameter values without creating ambiguous calls.
  • Write a recursive function with a base case and a recursive case.
  • Declare main() with or without command-line arguments.
  • Predict macro expansion, and control compilation with #if, #ifdef, #else and #endif.

Official topics

  • Function basics
  • Function types
  • Function overloading
  • Argument passing
  • Recursion
  • Main function
  • Conditional compilation
  • Macros
Pointers11%32 questions

Pointers hold memory addresses, and this domain tests working with them safely. Candidates declare and dereference pointers to variables, objects, functions and aggregates, use pointer arithmetic, and manage dynamic memory with new and delete.

Skills tested

  • Declare and initialize pointers to variables, objects, functions and aggregates.
  • Use the address-of and dereference operators correctly.
  • Move through an array with pointer arithmetic, and compare pointers.
  • Allocate memory with new, free it with delete or delete[], and avoid memory leaks.

Official topics

  • Pointer declarations
  • Pointer operations
  • Pointer arithmetic
  • Dynamic memory
Classes & Namespaces29%78 questions

The largest domain covers object-oriented C++. Candidates define classes with access specifiers, constructors and destructors, use inheritance and virtual functions for polymorphism, cast between class types, and organize code in namespaces.

Skills tested

  • Define classes with access specifiers, the this pointer and the :: operator.
  • Declare default, copy and explicit constructors, and destructors.
  • Override virtual functions to get polymorphic behavior through a base class pointer.
  • Cast between class types with static_cast and dynamic_cast.
  • Use friend functions and classes, and named, anonymous and aliased namespaces.

Official topics

  • OOP principles
  • Class definition
  • Constructors and destructors
  • Overloading
  • Inheritance
  • Type casting
  • Polymorphism
  • Friend functions
  • Namespaces
Practise these questions in study mode

Requirements

  • No formal prerequisites: anyone can book the exam.
  • Recommended: entry-level C++ knowledge and a grasp of basic programming concepts.
  • Recommended: a working knowledge of object-oriented ideas such as classes and inheritance.
  • Recommended: completion of the C++ Essentials 2 course.

About the CPA-21-02 exam

CPA-21-02 checks the C++ rules that an associate-level programmer applies every day: how expressions are evaluated, how control flows, how functions and pointers pass data, and how classes model objects. The C++ Institute sets the exam for students and developers who already know basic programming and object-oriented ideas. Many objectives turn on exact language rules, such as operator precedence or which overload the compiler picks. Passing earns the C++ Certified Associate Programmer (CPA) certification, which does not expire.

The PlanetCert practice test leans hardest on classes and on types and operators, the two largest domains. The explanations matter most where one rule decides the answer, such as why a switch falls through to the next case, or why a base class needs a virtual destructor. Study Mode suits the pointer questions, which reward drawing memory on paper. Brainy AI Assistant can explain an ambiguous overload, or show why a macro without parentheses gives a surprising result.

How to earn the certification

Earns
C++ Certified Associate Programmer (CPA)Associate

The certification does not expire.

After

How to prepare for CPA-21-02

  1. Install a compiler and test every rule

    Set up a standard C++ compiler and turn each syllabus rule into a tiny program. Running the code settles most doubts about precedence, promotion or overloads.

  2. Draw memory for pointer code

    Sketch each variable and pointer as a box with an address, then follow new, delete and pointer arithmetic step by step. The same habit helps with arrays, strings and objects in the other domains.

  3. Spend the most time on classes

    Classes & Namespaces carries the most weight. Write a small class hierarchy with constructors, a virtual destructor and an overridden function, then cast between the classes with static_cast and dynamic_cast.

  4. Test macros and overloads at the edges

    Write macros without parentheses and overloads that differ only slightly, then predict what the compiler does. Edge cases like these come up often in the practice test.

  5. Time a run, then recompile the misses

    Take the CPA-21-02 practice test in Timed Mode once all five domains are covered. Paste any surprising code into the compiler, and ask Brainy AI Assistant which rule explains the output.

    Start a timed CPA-21-02run

C++ Essentials 2 is the C++ Institute course that prepares candidates for this exam. The C++ Institute's partner organizations include OpenEDG and Cisco Networking Academy.

Who CPA-21-02 is for

  • Students who have finished an introductory C++ course and want a recognized next credential.
  • Junior developers who use C++ at work and want to prove their grasp of its rules.
  • Programmers from other languages who are switching to C++.
  • Engineers who program embedded systems in C++.

Typical job titles: Junior C++ developer · Software developer · Embedded software engineer · Systems programmer

Your Complete Exam Solution

Best-In-Class Practice Tests

Exam-style questions that match the format and difficulty of the real exam, updated regularly. Original material — not recycled dumps.

Topical Breakdown

Study by domain, pinpoint weak areas, and focus your time where it matters most. Every topic mapped to the official syllabus.

Flashcard Mode

Rapid-fire review to reinforce key concepts. Flip through questions and answers at your own pace before exam day.

See How You Compare Against Yourself

✕
✕
✕

Other Exam Prep

  • Outdated question dumpsRecycled, often inaccurate material
  • No explanationsMemorize answers without understanding
  • Static PDF filesNo interactive practice or feedback
  • Subscription feesRecurring charges, access expires
✓
✓
✓

PlanetCert

  • Verified, current questionsUpdated weekly to match live exam objectives
  • Expert-written rationalesUnderstand every concept, not just the answer
  • Session tracking & exam progressTrack every attempt, see your growth over time
  • Lifetime access, one pricePay once — updates included forever
CERTIFIEDCPA-21-02

Study Naturally, Study Responsibly

Practice with exam-style questions and detailed explanations until you're ready.

Try Free Demo
Secure Checkout Lifetime Access