Bloomberg LP Interview Question for Financial Software Developers


Country: United States
Interview Type: In-Person




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

Objects of class c and D

- Anonymous September 16, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
4
of 4 vote

only C and D. A can't be because it's a C object that means that watever object it is passed it should at least have all the C methods, and atributes, and A doesn't garantied to have.

- save.the.w. January 14, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
2
of 2 vote

In this question there is no difference if the classes are polymorphic or not, as no dynamic_cast operator is used.

A* a;
B* b;
C* c;
D* d;

In the following no dynamic_cast is used, so only the last two cases will work
foo (a); // error
foo (b); // error
foo (c); // ok - implicit conversion
foo (d); // ok - type matching

Here occurs implicit conversion, which only converts from derived to base class.

- Leo March 08, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

Only C and D even when base classes contain virtual functions. Remember type checking is done at compile time! If A or B is passed, compiler errors will be generated

A can't be - as A is not of type C
B can't be - as B is not related to C at all

- Mohan February 25, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 4 vote

1. Objects of class C and D can be passed if the classes are not polymorphic.
2. If Class A is polymorphic the objects of class A,B,C,D can be passed using
dynamic_cast<> where needed.

Depending on the polymorphic nature of the base classes the objects that can be passed will differ.

- Sabi September 22, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

I think A,C,D classes object can be passed all are polymorphic classes, then by using dynamic_cast it can be done.

- su September 17, 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