What is the sizeof (A) on the 32-bit platform, where A has the following definition::

class A
   int a;
   char ch;
   double d;
   virtual void f() = 0;
The compiler will align to the largest size of double. The virtual​ function takes an additional 4 bytes, and also aligned to 8 bytes.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Sign Up Now
or Subscribe for future quizzes