What happens when you attempt to compile and run the following code?#include <iostream>#include <string>using namespace std;void fun(int i);int main(){int i=0;i++;for (i=0; i<=5; i++){fun(i);}return 0;}void fun(int i){if (i==3)return;cout << i;}
Answer(s): C
What happens when you attempt to compile and run the following code?#include <iostream>using namespace std;int main(){int i = 5;do {i??;cout<<i;}while(i >= 0);return 0;}
Answer(s): A
What will happen when you attempt to compile and run the following code?#include <iostream>#include <string>using namespace std;string fun(string, string);int main(){string s="Hello";cout << fun(s, " World");return 0;}string fun(string s1, string s2){return s1+s2;}
What is not inherited from the base class?
Answer(s): A,B,C
How many times will the program print "HELLO" ?#include <iostream>using namespace std;int main(){cout<<"HELLO";main();return 0;}
Answer(s): D
Post your Comments and Discuss C++ Institute CPA-21-02 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the CPA-21-02 content, but please register or login to continue.