Interview Question for Developer Program Engineers






Comment hidden because of low score. Click to expand.
0
of 0 vote

will depend on how memory grows in heap.

- Anonymous June 01, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I guess it is impossible. I tried it on Ubuntu and the results are EXACTLY the same. Another interesting quesiton is that there is no "class" concept in C. why does author use "printf" instead of "cout"?

- Anonymous June 01, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

@^ Noob :P

- HaHa June 02, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

haha seriously mega noob :))

- Anonymous June 03, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

I guess class B may overloaded some members of A

- Anonymous June 02, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

How will it depend on how the memory grows on the heap ??? both are adddresses , printed in hexadecimal .
And please don't be mean , if you can't answer something fully , don't bother commenting .I really hate it when one pulls someone's leg unnecessarily like that .
This can happen if the class B has virtual methods , while class A does not have them . In that case , the part of class A that is in class B , will have a non-zero offset . thus resulting in different addresses , no matter how your heap is .

- Anonymous June 03, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I guess "=" operator maybe overloaded to give create new object and return it.

- szihs June 06, 2011 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More