Bloomberg LP Interview Question for Financial Software Developers






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

If an exception is thrown from a destructor, the program crashes and memory is not freed.

E.g. The following crashes when encountering throw.

~abc()
  {
	   throw std::exception("Undefined Variable!"); 
       std::cout << a << " Inside Dtor \n";
  }

- Rajika Tandon November 12, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

If the exception is not caught, then terminate is called. If not terminate, program aborted. Else, possibly memory leak, etc.

If destructor throws exception during stack unwinding, terminate is called.

- Anonymous November 15, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

answer to 2..size of vtbl pointer when virtual functions.

- Anonymous November 15, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Memory layout includes:
1. memory for non-static data members (consider alignment)
2. simple inheritance is straightforward though a fixed layout is not guaranteed by the C++ standard
2. pointer to virtual table if one exists (implementation dependent)
3. virtual inheritance: it will be an implementation dependent mess. Usually, a pointer to a virtual base object is added to every object directly derived from it.

- Anonymous June 06, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Answer to 5: (Duh!)

Go over string once say from L to R and update a integer map.
Go over string again and check the map for every character. Return first character for which map[ch] == exactly 1.

- Nix November 22, 2009 | 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