Free CPA-21-02: CPA – C Certified Associate Programmer Exam Questions and Answers
CPA – C Certified Associate Programmer is exam CPA-21, part of the C++ Institute certification programme from OpenEDG's C++ Institute. The C++ Institute is the sibling of the Python Institute — both are non-profit initiatives of OpenEDG — which is why their credentials look alike and are so often confused. It runs two language tracks rather than one: C++ through CPE at entry level, then CPA and CPP, and a parallel C track through CLE, CLA and CLP. CPA and CPP are both still actively offered, contrary to a fair amount of material that treats them as discontinued. The institute does not publish question counts, durations, pass marks or prices for them on its openly accessible pages.
The first 10 questions on this page are free to read, answers included — no account and no card. A plan opens the rest of the bank, the full timed practice test and your weak-topic reporting.
Last updated: September 8, 2026
- Exam code
- CPA-21
- Provider
- C++ Institute
- Questions in our bank
- 1000+
- Free to read
- First 10, with answers
- Official page
- Official Exam website
- Our test mode duration & pass mark
- 130 mins · 70%
Recommended: Switch to Test Mode to start a practice test that simulates the real exam experience.
Question #1
Which keyword is used to define a function in C++?
Please select an optionIncorrectCorrect answer: B
In C++, the function keyword is used to define functions.
Was this answer correct?Question #2
What is the size of an int in C++ on most systems?
Please select an optionIncorrectCorrect answer: D
On most systems, an int typically takes up 4 bytes of memory.
Was this answer correct?Question #3
What does the following code do: x = (a > b) ? a : b;?
Please select an optionIncorrectCorrect answer: B
This is a ternary operator that assigns the greater of a or b to x.
Was this answer correct?Question #4
What will be the output of cout << 10 / 3;?
Please select an optionIncorrectCorrect answer: B
In integer division, the result is the quotient without the fraction part, thus the result is 3.
Was this answer correct?Question #5
Which of the following is a valid way to declare a pointer in C++?
Please select an optionIncorrectCorrect answer: A
The correct syntax for declaring a pointer is int *p;.
Was this answer correct?Question #6
What is the purpose of the return statement in a function?
Please select an optionIncorrectCorrect answer: B
The return statement terminates the function and optionally returns a value to the caller.
Was this answer correct?Question #7
Which loop will guarantee at least one execution?
Please select an optionIncorrectCorrect answer: D
The do-while loop guarantees that the body will be executed at least once.
Was this answer correct?Question #8
How do you declare an array of integers in C++?
Please select an optionIncorrectCorrect answer: C
The correct declaration of an integer array is int array[10];.
Was this answer correct?Question #9
What is the output of sizeof(char)?
Please select an optionIncorrectCorrect answer: C
The size of a char in C++ is guaranteed to be 1 byte.
Was this answer correct?Question #10
Which of the following is not a valid identifier in C++?
Please select an optionIncorrectCorrect answer: B
Identifiers cannot begin with a digit in C++.
Was this answer correct?
Continue with CPA-21-02: CPA – C Certified Associate Programmer
Unlock the full question bank
You have read the first 10 questions. A subscription opens every question in CPA-21-02: CPA – C Certified Associate Programmer, the full timed practice test, and your progress and weak-topic reporting.
Single exam
$19.99for 30 days
Full question bank and practice test for one exam, for 30 days.
ChooseSingle exam
$49.99for 1 year
One exam for a full year. Nothing renews and nothing to cancel.
ChooseFull access
$39.99/mo
Every exam in the catalogue, month to month.
ChooseFull access
$199.99/yr
Every exam in the catalogue for a year.
Choose
Already subscribed? Sign in to pick up where you left off.
Other C++ Institute certifications
Reviews
★★★★★
This platform is a lifesaver. The practice questions and explanations are so detailed. It’s the best study tool I’ve ever used.
Hannah Smith
USA
★★★★★
I highly recommend Exam Practice. The feedback after each test helped me improve significantly, and I passed my exams easily.
Oscar Nyström
Sweden
★★★★★
Exam Practice is worth every penny. The mock exams are realistic, and the feedback helped me focus on key areas.
Amit Sharma
India
FAQ
Learn More: https://cppinstitute.org/
- Q1: What is the CPA-21-02: CPA – C Certified Associate Programmer exam?
- A: CPA-21-02: CPA – C Certified Associate Programmer is a C++ Institute certification exam. Judging by the questions in our bank, it concentrates on cout, output, declare, sizeof and keyword.
- Q2: What topics does the CPA-21-02: CPA – C Certified Associate Programmer exam cover?
- A: Questions in our CPA-21-02: CPA – C Certified Associate Programmer bank cluster around cout, output, declare, sizeof, keyword, array, integer and operator. Working through the full set is the quickest way to find which of these you are weakest on.
- Q3: How should I prepare for CPA-21-02: CPA – C Certified Associate Programmer?
- A: Work through the CPA-21-02: CPA – C Certified Associate Programmer practice questions here, checking your answer on each one, then sit the practice test to rehearse the exam under timed conditions before the real thing.
- Q4: Are these real CPA-21-02: CPA – C Certified Associate Programmer exam questions?
- A: They are drawn from officially released past questions and from community members who have sat CPA-21-02: CPA – C Certified Associate Programmer. Answers are verified and updated weekly.
- Q5: Where do I register for the CPA-21-02: CPA – C Certified Associate Programmer exam?
- A: Register through C++ Institute directly at https://cppinstitute.org/. Exampractice is not affiliated with C++ Institute and does not administer the exam.
- Q6: Is there a free CPA-21-02: CPA – C Certified Associate Programmer sample?
- A: Yes. Every CPA-21-02: CPA – C Certified Associate Programmer page shows a free sample of real questions. Upgrading opens the full bank and the practice test.
- Q7: What are C++ Institute Certification Exams?
- A: C++ Institute Certification Exams validate your expertise in C and C++ programming languages. These certifications demonstrate your proficiency in coding, developing, and implementing applications using C/C++ standards and best practices.
- Q8: Why should I pursue C++ Institute Certification?
- A: C++ Institute Certification enhances your professional credibility, showcasing your skills and knowledge in C/C++ programming. This can lead to better job opportunities, higher salaries, and career advancement in software development, embedded systems, game development, and other roles requiring proficiency in C/C++.
- Q9: What are the benefits of C++ Institute Certification?
- A: Benefits include recognition as a certified C/C++ professional, improved job performance, access to exclusive resources, continuing education opportunities, and staying current with the latest programming standards and best practices.
- Q10: Who should take C++ Institute Certification Exams?
- A: Aspiring programmers, software developers, game developers, embedded systems engineers, and anyone involved in programming with C/C++ should consider these certifications to validate their expertise and advance their careers.
- Q11: What types of C++ Institute Certification Exams are available?
- A: The C++ Institute offers various certification paths, including:
- Q12: How do I prepare for C++ Institute Certification Exams?
- A: Preparation can include official C++ Institute training courses, study guides, practice exams, online tutorials, and hands-on experience with C/C++ programming.
- Q13: Where can I take C++ Institute Certification Exams?
- A: C++ Institute Certification Exams can be taken online with remote proctoring or at authorized Pearson VUE testing centers worldwide, providing flexibility to fit your schedule and location.
- Q14: How do C++ Institute Certifications impact my career?
- A: C++ Institute Certifications significantly boost your career by demonstrating your expertise to employers, making you a more competitive candidate for advanced roles and promotions in software development, game development, embedded systems, and other programming-related fields.
- Q15: Are there any prerequisites for C++ Institute Certification Exams?
- A: The CLA and CPA exams have no prerequisites, making them suitable for beginners. The CLP and CPP exams are designed for individuals with foundational knowledge and experience in C/C++ programming. Check the specific requirements for each certification path on the C++ Institute certification website.
- Q16: How often do I need to recertify for C++ Institute Certifications?
- A: C++ Institute Certifications do not require mandatory recertification. However, staying updated with the latest programming standards and continuing professional development is recommended to maintain your skills and relevance in the industry.



