#includeiostream
using namespace std;
class Test1
{
int x;
public:
void show() { }
};
class Test2
{
int x;
public:
virtual void show() { }
};
int main(void)
{
coutsizeof(Test1)endl;
coutsizeof(Test2)endl;
return 0;
}

Find the output :-

Posted on by