Re: C++ programmer and assembly
On Apr 24, 7:28 am, Francis Glassborow <franc...@robinton.demon.co.uk>
wrote:
i...@0x4849.net wrote:
Le Chaud Lapin <jaibudu...@gmail.com> wrote:
2. What is the tersest C++ statement involving the number zero "0"?
I dont see what you are testing here
Yes, it is another silly question:
0;
Not a silly question to someone who claims to have been technical lead
of a compiler development team for three years. I best if Walter
Bright had been asked this question, he would not have gotten it
wrong. The candidate I asked, did. When he got it wrong, I asked,
"What does LALR(1) mean to you?" He did not know. It was at that
moment that a another member of the interviewing team made his
decision. In the post interview, he asked explicitly what I was
hinting at implicitly:
"How can someone who acted as technical lead of compiler development
for threee years not know what LALR(1) means?"
3. When does sizeof(class A) does not equal to the sum of
sizeof(individual member variables of A)?
Isn't this implementation dependent i.e. not defined by the standard
well there are a couple of things we can say such as when the class has
non-empty bases (but I am not sure he meant that) and when the class
needs padding to meet alignment requirements (implementation dependent)
Either of these answers would have been correct. Some interviewers
mention that the class has at least one virtual function, which would
also be correct.
-Le Chaud Lapin-
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]