61.
What will be the output of the following C++ code?
#include <iostream>
#include <exception>
using namespace std;
class base { virtual void dummy() {} };
class derived: public base { int a; };
int main () 
{
    try 
    {
        base * pba = new derived;
        base * pbb = new base;
        derived * pd;
        pd = dynamic_cast<derived*>(pba);
        if (pd == 0) 
            cout << "Null pointer on first type-cast" << endl;
        pd = dynamic_cast<derived*>(pbb);
        if (pd == 0) 
            cout << "Null pointer on second type-cast" << endl;
    } 
    catch (exception& e) 
    {
        cout << "Exception: " << e.what();
    }
    return 0;
}

62.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
struct A
{
    virtual ~A()
    { 
        cout << "~A()" << endl; 
    }
    void operator delete[](void* p, size_t)
    {
        cout << "A :: operator delete[]" << endl;
        delete [] p;
    }
};
struct B : A 
{
    void operator delete[](void* p, size_t) 
    {
        cout << "B :: operator delete[]" << endl;
        delete [] p;
    }
};
int main() 
{
    A* bp = new B[3];
    delete[] bp;
};

63.
What is the Run-Time Type Information?

64.
What will be the output of the following C++ code?
#include <iostream>
#include <exception>
#include <cstdlib>
using namespace std;
void myterminate () 
{
    cerr << "terminate handler called";
    abort();
}
int main (void) 
{
    set_terminate (myterminate);
    throw 0; 
    return 0;
}

66.
What will be the output of the following C++ code?
#include 
int main ()
{
    FILE * p;
    long size;
    p = fopen ("test.txt", "rb");
    if (p == NULL) 
        perror ("Error opening file");
    else
    {
        fseek (p, 0, SEEK_END); 
        size = ftell (p);
        fclose (p);
        printf (" %ld\n", size);
    }
    return 0;
}

67.
What does the first parameter of the main function represent?

68.
What will be the output of the following C++ code?
#include <iostream> 
#include <vector> 
 
using namespace std; 
 
int main() 
{ 
    vector<int> v; 
 
    for (int i = 1; i <= 5; i++) 
        v.push_back(i); 
 
    vector<int> :: iterator i;
    i = v.begin();
    *i = 3;
   	for (i = v.begin(); i != v.end(); ++i) 
        cout << *i << " ";
    cout<<endl;
 
    return 0; 
}

70.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class MyException
{
    public:
    MyException(int value) : mValue(value)
    {
    }
    int mValue;
};
class MyDerivedException : public MyException
{
    public:
        MyDerivedException(int value, int anotherValue) : MyException(value),    mAnotherValue(anotherValue)
        {
        }
        int mValue;
        int mAnotherValue;
};
void doSomething()
{
    throw MyDerivedException(10,20);
}
int main()
{
    try
   {
        doSomething();
    }
    catch (MyDerivedException &exception)
    {
        cout << "\nCaught Derived Class Exception\n";
    }
    catch (MyException &exception)
    {
        cout << "\nCaught Base Class Exception\n";
    }
    return 0;
}