C++ Institute CPA Associate Programmer Practice Exam
Sign in to Google to save your progress. Learn more
Write down the full name *
Write down the your phone number *
Write down the your phone E mail addres *
QUESTION NO: 201                                                                                                        Which definitions are correct? *
1 point
QUESTION NO: 202                                                                                                                                                         Which code, inserted at line 8, generates the output "100"?#include <iostream>using namespace std;int fun(int);int main(){int *x = new int;*x=10;//insert code herereturn 0;}int fun(int i){return i*i;}   *
1 point
QUESTION NO: 203                                                                                      What happens when you attempt to compile and run the following code?#include <iostream>using namespace std;int fun(int x) {return 2*x;}int main(){int i;i = fun(1) || fun(2);cout << i;return 0;} *
1 point
QUESTION NO: 204                                                                                                                                                    What happens when you attempt to compile and run the following code?#include <iostream>using namespace std; int main(){int i = 5;cout<<"Hello World" << ++i;return 0;} *
1 point
QUESTION NO: 205                                                                                                                                                                       What happens when you attempt to compile and run the following code?#include <iostream>using namespace std;  class First{public:First() { cout << "Constructor";}~First() { cout << "Destructor";}void Print(){ cout<<"from First";}};int main(){First FirstObject;FirstObject.Print();} *
1 point
QUESTION NO: 206                                                                                                                                  Which of the following is a user defined data type?1:struct person{char name[20];int age;};  2:int l=2;3:enum color {red,blue, green};D.char c; *
1 point
QUESTION NO: 207                                                   What will happen when you attempt to compile and run the following code?#include <iostream>using namespace std;int main (int argc, const char * argv[]){enum state { ok, error, warning};enum state s1, s2, s3;s1 = ok;s2 = warning;s3 = error;s4 = ok; cout << s1<< s2<< s3;return 0;} *
1 point
QUESTION NO: 208                                                                                                                                                     What happens when you attempt to compile and run the following code?#include <iostream>using namespace std;class A {public:void Print(){ cout<<"A";}};class C:public A {public:virtual void Print()=0; };int main()  {C obj3;obj3?>Print();} *
1 point
QUESTION NO: 209                                                                                      What happens when you attempt to compile and run the following code?#include <iostream>using namespace std; int main (int argc, const char * argv[]){int tab[5]={1,2,3};for (int i=0; i<5; i++)cout <<tab[i];return 0;} *
1 point
QUESTION NO: 210                                                                What happens when you attempt to compile and run the following code?#include <iostream>#include <string>using namespace std;class A {public:A() { cout << "A no parameters";}A(string s) { cout << "A string parameter";}A(A &a) { cout << "A object A parameter";}};class B : public A {public:B() { cout << "B no parameters";}B(string s) { cout << "B string parameter";}};int main () { A a1;A a2("Test");B b1("Alan");return 0;} *
1 point
Next
Clear form
Never submit passwords through Google Forms.
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy