Bloomberg LP Interview Question for Software Engineer / Developers






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

nor do I...

It also compiles just fine on my system.

- Wandering programmer February 28, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I did not see any reason no

- Anonymous February 26, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Since throw specification is NOT the part of function signature , there is nothing wrong with the code. Moreover, it will normally call "abc()" of the derived class in the following situation:

Foo* fo;
fo = new DFoo();
fo->abc();
delete fo;

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

This is the case of function overwriting with both the classes base and derived have same signature function abc(), with base class function being declared as virtual, derived class object can access its own method/function...hence no ambiguity with the complier and i think code must run successfully.

- nick March 02, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

No, it is problematic. the base class function can not be access by derived class object anyway due to function hiding. because the base and derived classes have same function name but diff signature

- chun March 05, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Chun..Don't worry we have the keyword "using" which can bring the base class function into the scope of derived class.

- Musheka March 06, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

No this wont compile since it has the stack unwinding problem...

- james March 12, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Code works....
Run the code and see

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

Abhimanipal is hired!

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

Its not correct. Refer gotw.ca/publications/mill22.htm

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

@NK : thanks for the link. It only talks about the exception specification list, not about its order. So it does compile.

- Anonymous January 23, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

No i don't think it is right as in the base class the function is defined as virtual but in the subclass there is no definition.

- mm March 01, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

you see curly braces; thats defination (no matter it's empty)!!

- Anonymous September 11, 2010 | 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