Exam Code: CPA-21-02
Exam Questions: 257
CPA C++ Certified Associate Programmer
Updated: 25 Nov, 2026
Viewing Page : 1 - 26
Practicing : 1 - 5 of 257 Questions
Question 1

Which statement should be added in the following program to make work it correctly? using namespace std; int main (int argc, const char * argv[]) { cout<<"Hello"; }

Options :
Answer: C

Question 2

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 3

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


Options :
Answer: C

Question 4

Which code line inserted instead of the comment below will fix the program so that it produces the expected output and does not cause any memory leak? 


Options :
Answer: A

Question 5

What happens when you attempt to compile and run the following code? #include using namespace std; int op(int x, int y); int main() { float *pf; float f=0.9; pf=&f; cout << op(1, *pf); return 0; } int op(int x, int y) { return x*y; }

Options :
Answer: A

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

© Copyrights FreePDFQuestions 2026. All Rights Reserved

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