Question 31

What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
int op(int x, int y);
int main()
{
int i=2, j=2, k;
float f=0.3;
k = op(i, j);
cout<< k << "," << op(1, f);
return 0;
}
int op(int x, int y)
{
return x+y;
}
  • Question 32

    What will be the output of the program?
    #include <iostream>
    using namespace std;
    int fun(int);
    int main()
    {
    cout << fun(5);
    return 0;
    }
    int fun(int i)
    {
    return i*i;
    }
  • Question 33

    What will be the output of the program?
    #include <iostream>
    using namespace std;
    int main()
    {
    const int y = 5;
    const x = ?10;
    cout<<x<<" "<<y;
    return 0;
    }
  • Question 34

    Which code, inserted at line 8, generates the output "0102020"?
    #include <iostream>
    using namespace std;
    class Base {
    static int age;
    public:
    Base () {};
    ~Base () {};
    //insert code here
    void Print() { cout << age;}
    };
    int Base::age=0;
    int main () {
    Base a,*b;
    b = new Base();
    a.Print();
    a.setAge(10);
    a.Print();
    b?>setAge();
    a.Print();
    b?>Print();
    return 0;
    }
  • Question 35

    What happens when you attempt to compile and run the following code?
    #include <iostream> #include <string>
    using namespace std;
    class A {
    protected:
    int y;
    public:
    int x, z;
    A() : x(1), y(2), z(0) {}
    A(int a, int b) : x(a), y(b) { z = x * y;}
    void Print() { cout << z; }
    };
    class B : public A {
    public:
    int y;
    B() : A() {}
    B(int a, int b) : A(a,b) {}
    void Print() { cout << z; }
    };
    int main () {
    A b(2,5);
    b.Print();
    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