Become C++ Institute Certified with updated CPA-21-02 exam questions and correct answers
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
What happens when you attempt to compile and run the following code? #include using namespace std; class Test { float i,j; }; class Add { public: int x,y; Add (int a=3, int b=3) { x=a; y=b; } int result() { return x+y;} }; int main () { Test test; Add * padd; padd = &test; cout result(); return 0; }
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?
Which code, inserted at line 8, generates the output "100"? #include using namespace std; int fun(int); int main() { int *x = new int; *x=10; //insert code here return 0; } int fun(int i) { return i*i; }
What happens if characters 'w', 'o', 'r', 'l' and 'd' are entered as input? #include #include using namespace std; int main() { string s1 = "Hello"; string s2; getline( cin, s2 ); cout
© Copyrights DumpsCertify 2025. All Rights Reserved
We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the DumpsCertify.