Bloomberg LP Interview Question for Financial Software Developers






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

1. use pointers when you know a variable might point to NULL, if your design does not allow for the possibility that the variable is null, you should probably make it a reference variable.
2. pointers can be reassigned but references cannot be. a reference, however, always refers to the object with which it is initialized.
- Item 1 : Basics: Pointers Vs References: from Scott Meyers book "More Effective C++"

- GekkoGordan January 27, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

What do they mean by "why don't we use pointers in C++?" I must have missed the demo.

- Anonymous January 27, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I meant memo. :)

- Anonymous January 27, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

In addition to GekkoGorden's comment:
If we want to use the following function as MyFn(1);
void MyFn(const int * p);
Compiler will shout.
But, same we can achieve with references:
void MyFn(const int& v);
This function will work for both const or non-const variables or objects.
In such situations we avoid using pointers.

- Anonymous January 29, 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