Question 121

What is the output of the program?
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s1="World";
string s2;
s2="Hello" + s1;
cout << s2;
return( 0 );
}
  • Question 122

    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";}
    B(int s) { cout << "B int parameter";}
    };
    int main () {
    A a2("Test");
    B b1(10);
    B b2(b1);
    return 0;
    }
  • Question 123

    What happens when you attempt to compile and run the following code?
    #include <iostream> #include <string> using namespace std;
    class B;
    class A { int age; public: A () { age=5; }; friend class B; };
    class B { string name;
    public:
    B () { name="Bob"; };
    void Print(A ob) {
    cout << name << ob.age;
    }
    };
    int main () {
    A a;
    B b;
    b.Print(a);
    return 0;
    }
  • Question 124

    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();
    }
  • Question 125

    What happens when you attempt to compile and run the following code?
    #include <iostream>
    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 << padd?>result();
    return 0;
    }
  • Premium Bundle

    Newest CPA Exam PDF Dumps shared by BraindumpsPass.com for Helping Passing CPA Exam! BraindumpsPass.com now offer the updated CPA exam dumps, the BraindumpsPass.com CPA exam questions have been updated and answers have been corrected get the latest BraindumpsPass.com CPA pdf dumps with Exam Engine here:

    (220 Q&As Dumps, 40%OFF Special Discount: Exam-Tests)
    Other Version
    4180C++Institute.CPA.v2024-03-18.q106
    Latest Upload
    167PaloAltoNetworks.SSE-Engineer.v2026-10-17.q44
    290Cisco.300-420.v2026-10-17.q324
    202Salesforce.MCE-Con-201.v2026-10-15.q108
    182EMC.NCA.v2026-10-15.q25
    283Apple.Apple-Device-Support.v2026-10-15.q159
    191F5.F5CAB3.v2026-10-14.q47
    190Oracle.1Z0-1048-25.v2026-10-14.q67
    268Cisco.300-730.v2026-10-14.q199
    259Salesforce.Sales-Admn-202.v2026-10-14.q160
    176ServSafe.ServSafe-Manager.v2026-10-13.q32