Bloomberg LP Interview Question for Software Engineer / Developers






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

when information stored in 'front of block allocated' is greater than the block itself e.g. you are allocating characters using new. the info to locate this block / info to locate next free block/info to locate next allocated block will be much larger than the data itself.

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

Another use thought I am not 100% sure is when you want to place your object at a specific location in the memory

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

When you want to use your own memory management instead of the default one.

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

Effectively, if you want to avoid heap fragmentation. If suppose different size of memory is going to get allocate everytime, we might run out of big chunk of memory which might reduce the performance, so you can handle your own memory by creating fixed amount of memory for a particular object.

This need will be highly in the case of real time embedded applications.

- sandy May 10, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

good answer

- siva.sai.2020 May 12, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Overloading new? Is Bloomberg full of C-style dinosaurs? If you don't want the default memory management, use libraries. Don't bother with overloading new.

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

void sample()
{
void* place = (void*) 0xFEEDBABE;
Fred* p = new(place) Fred(42, 42);
// ...

}

The above can be used for I/O operations or etc in embedded system,say, when the system is sure that a new Fred object get created only at the location 0xFEEDBABE and it has to interpret this class.

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

This is actually "placement new" operator, not operator "new" overloading.

- sergey.a.kabanov January 14, 2012 | 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