Higher Test Marks with Free Online CPA-21-02 Exam Practice

Assess the CertsIQ’s updated CPA-21-02 exam questions for free online practice of your CPA C++ Certified Associate Programmer test. Our CPA 21-02 dumps questions will enhance your chances of passing the C++ Certified Professional Programmer certification exam with higher marks.

Exam Code: CPA-21-02
Exam Questions: 257
CPA C++ Certified Associate Programmer
Updated: 20 Aug, 2025
Question 1

What happens when you attempt to compile and run the following code? 


Options :
Answer: C

Question 2

What is the output of the program? #include using namespace std; #define SQR(x)(x*x) int main(int argc, char *argv[]) { int x, y=2; x = SQR(y); cout << x << ", " <

return 0;

}

Options :
Answer: B

Question 3

What happens when you attempt to compile and run the following code? #include using namespace std; int main() { const int x=0; const int *ptr; ptr = &x; cout<<*ptr; return 0; }

Options :
Answer: A

Question 4

What will be the output of the program? #include using namespace std; int fun(int); int main() { cout << fun(5); return 0; } int fun(int i) { return i*i; }

Options :
Answer: A

Question 5

What happens when you attempt to compile and run the following code? #include using namespace std; int main() { int i=5; switch(i) { case 1: cout<<"Hello"; break; case 2: cout<<"world"; break; case 3: break; default: cout<<"End"; } return 0; }

Options :
Answer: C

Viewing Page : 1 - 26
Practicing : 1 - 5 of 257 Questions

© Copyrights CertsIQ 2025. All Rights Reserved

We use cookies to ensure that we give you the best experience on our website (CertsIQ). If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the CertsIQ.