Re: Interview question
Noah Roberts wrote:
How would you answer this question?
"Describe the structure of a class."
I was stumped, quite frankly.
Did you ask what they mean by 'a class'? Perhaps it was the
memory layout of an instance they were interested in or perhaps
it was the syntactical form of 'a class definition'... You can
spin this in any direction showing off the knowledge of the
virtual inheritance and its implementation, virtual function
pointer table, the fact that the layout is only guaranteed
between access specifiers, the fact that member functions don't
take up space in the instance (beyond the first virtual function),
and so on.
If you didn't ask, you still have choices and so you could simply
start by saying "if you mean blah, then blahblah". If the
intervewer nods, you made the right guess. If they keep listening
without indicating whether you guessed right, you finish one
description, and begin another, "And if you mean blahblah,
then blahblahblah"...
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask