JP Morgan Interview Question for Financial Software Developers






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

b and c
b changes the object size and memory layout of other members. c changes the layout of vtable and how destructor is found.

- Anonymous May 30, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

Here statement d is bit confusing. Let us assume all the scenario.

1) A default value is assigned to the existing argument in the member function
In this case there is no need to recompile the libraries. As the signature of the member function still remains the same.

2) A new argument is added with a default value.
Here recompilation is required for sure. The reason is as mentioned above changes to the member function interface i,e adding a new argument would require to recompile the library.

- Hiten Parmar October 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

I think its language specific too. In Java, d requires recompiling dependent libs

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

should be letter d, because that is sort of changing the interface of the function which it was a bit different in the libraries.

- bwc July 30, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Looks like none actually.
Reasons:
a) Addition of second constructor would be an overloaded one. First constructor(Assuming one already was there still holds good for the client application)
b) New data member addition doesn 't require clt application to rebuild
c)Destructor is called internally when the object is deleted or goes out of scope. So no need to rebuild again
and finally
d)member function with default argument would again would not require clt code change

- days September 14, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

agree with days

- shoushou January 16, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

answer is b and C....
and for d if we consider a default value is assigned to the existing argument in the member function..then we don't have to compile..

- 4th Idiot December 30, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

For d, we need a recompilation. Read more on name mangling. tricky but name mangling uses args of a function for generating names...

- game. May 24, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

what about adding a constructor??...suppose i add a parameterised constructor, will get errors if some base class exists, as base class wil have to provide the values for this new const

- aaman.singh85 March 04, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

In C++, it would be all above.

Basically they all involve changes to the header file while will be included by the libraries use it.

Only exception is if a library only holds pointer or reference to this class but do not call any methods. It can get away with only forward declaration, hence no need to recompile the translation unit.

- Chi September 04, 2013 | 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