Bloomberg LP Interview Question for Financial Software Developers






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

An overloaded operator is like a function call, hence it can be overloaded twice but with different signatures. Its nothing but function overloading!

- sudarshan.fs August 23, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Generally, polymorphism refers to the ability to
appear in many forms
● Polymorphism in a Java program
The ability of a reference variable to change
behavior according to what object instance it is
holding.
No,It is not possible to overload a single operator twice......

- Raju August 21, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

You are not right - it is possible to overload a single operator twice.

- elena August 24, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Operators can be definitely overloaded more than once, but you should have different signatures. For example, you may overload + for adding two MyClass objects, but you can overload + once again for adding MyClass object and an integer.

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

I think the this not only applies to operators but overloading in general. There cant be any function which can be overloaded with same signatures. The reason for this is name mangling of functions; same function name and different parameter list are being given different names by compiler and appropriate function is called accordingly. If same function parameters are given then logically it should confuse (and it does) compiler to differentiate between different versions of function.

- Roxanne September 13, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

You can overload operators as Victor said. However, you cannot overload it with different number of parameters... i.e. you cannot have "+" operator to take 2 input parameters apart from the calling class

- Piyush October 18, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

What Victor said is partly correct. You can definitely have two definitions for overloaded operator. But one of them has to be friend function else compiler would throw an error. Suppose you want to overload + operator twice. First function would add 2 integers and second myclass& and int&. so define one of the operator as friend.

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

operator can be overloaded more than once with different signatures but the same pattern of arguments

- Anonymous March 31, 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