PayPal Interview Question for Software Engineer / Developers






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

Virtual tables are attached to the class not to the instance of class.
stackoverflow.com/questions/2173493/virtual-table-c

- NoName August 13, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

yes v table is created but the corresponding entry for pure virtual function will be NULL.
Hence at runtime when we will check if the vtable will have any NULL entries the corresponding class will not be allowed to instantiate

- devanshi choudhary April 06, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

yes

- kk August 08, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

yes.it doest not depend upon where u instantiate it or not

- deepesh August 10, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Where is the virtual table located if the class is never instantiated?

- Anonymous August 10, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

I would say it probably depends on the compiler...

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

See this: stackoverflow.com/questions/2592438/does-an-abstact-classes-have-a-vtable

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

Yes, but the vtable pointer to pure virtual function will be NULL.

- sergey.a.kabanov January 11, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Yes, u r rt :)

- Mudit May 10, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Yes, as abstract/base class will be constructed when an object of derived class is constructed, hence at that time the abstract/base class constructor will set the vtable pointer to its own vtable.

- dronzer709 May 20, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Yes, as abstract/base class will be constructed when an object of derived class is constructed, hence at that time the abstract/base class constructor will set the vtable pointer to its own vtable.

- dronzer709 May 20, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

pure abstract class creates vtable but entry of address to function is not made..which makes vtable incomplete and that makes the class not to create object.

- ramachandran May 25, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

since the object creation is not possible for abstarct class then where exactly the v-table is/are created for the abstract class.

- Prabhakar December 14, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

since the object creation is not possible for the abstarct class then where exactly the v-table is/are created...according to me, the v-tables are created in the ctor of the class..right....in this case, what would be the behaviour

- Prabhakar December 14, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 votes

there is nothing to do with v table and object creation

- kamal September 14, 2011 | Flag


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