Confidently Practice Online with Free CPA-21-02 Exam Cram

Practice your CPA C++ Certified Associate Programmer certification test with free CPA-21-02 exam cram and take control of your certification preparation. At FreeExamCram, you can practice online for free using real CPA-21-02 exam dumps, verified questions, and expert-designed free online practice tests. Moreover our C++ Institute CPA-21-02 exam cram backed by our confidence-boosting refund guarantee.

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

What is the output of the program given below? #include using namespace std; int main (int argc, const char * argv[]) { enum state { ok, error, warning}; enum state s1, s2, s3, s4;  s1 = ok; s2 = warning; s3 = error; s4 = ok; cout << s1<< s2<< s3<< s4; return 0; }

Options :
Answer: C

Question 2

What happens when you attempt to compile and run the following code? #include using namespace std; int main() { int i, j; for(i = 0; i < 2; i++) { for(j = i; j < i + 1; j++) if(j == i) continue; else break; } cout << j; return 0; }

Options :
Answer: C

Question 3

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

Question 4

What happens when you attempt to compile and run the following code? #include #include using namespace std; int main() { string s1[]= {"How" , "to" }; s1[0].swap(s1[1]); for (int i=0; i<2; i++) { cout << s1[i]; } return( 0 ); }

Options :
Answer: B

Question 5

What happens when you attempt to compile and run the following code? #include using namespace std; int main() { int i, j; for(i = 0; i < 2; i++) { for(j = i; j < i + 1; j++) if(j == i) continue; else break; } cout << j; return 0; }

Options :
Answer: C

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

© Copyrights FreeExamCram 2026. All Rights Reserved

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