What is the output of the following program?
Assume sizeof( int ) = 4
#include <iostream> using namespace std;
class Base { public: virtual void fun() { cout << “Base Class” << endl; } }; class Derived : public Base { public: void fun() { cout << “Derived Class” << endl; } }; int main() { Base objBase; cout << sizeof( objBase ) << endl; }
Reveal answer
Fill a bubble to check yourself