?
What will be the output of the following C++ code?
What will be the output of the following C++ code?
#include <iostream>
#include<type_traits>
using namespace std;
class Base
{
public:
virtual void function1() {};
virtual void function2() {};
};
int main()
{
Base b;
cout<<sizeof(b);
return 0;
}
#include <iostream>
#include<type_traits>
using namespace std;
class Base
{
public:
virtual void function1() {};
virtual void function2() {};
};
int main()
{
Base b;
cout<<sizeof(b);
return 0;
}
Join the Discussion
Login to post a comment or share your explanation.
Login