Bloomberg LP Interview Question Software Engineer / Developers
0of 0 votesGiven the following definition:
class C{};
How much space gets allocated?
What methods get created?
Country: United States
Interview Type: In-Person
class C{};
C* pc = new C;
int n = sizeof(C);
n = sizeof(*pc);
I don't know why but n was 1.
Still the member methods are created and they are not counted as a size.

empty class size is 1.
- kbhaskarkotha on March 14, 2012 Edit | Flag Reply