Bloomberg LP Interview Question for Financial Software Developers






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

Three things must be put in the init list:
1) Member without default constructor
2) const
3) reference

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

nice

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

ctor
A() : I(J) {} ?

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

Yes thats right

- TopCoder February 23, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

You can't declare an uninitialised reference. It will give an error.

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

Actually, you cannot declare uninitialized reference only OUSIDE the class body.
Inside the class, you can do it, but after you will not be able to create an object of the class, you will get an error 
"no default constructor":

class Bugaga1
{
	
	int& i;

};


//Bugaga1 bugug; // if you have an unitialized reference inside the constructor, you cannot create the object (it will say "no default constructor")

//Bugaga1* bugug;
//bugug = new Bugaga();

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

It is true, you can't declare an uninitialized reference. However, Zaphod's modification of the constructor is correct. The the initialization list is the only place a member reference can be initialized.

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

A(int jj):i(j),j(jj){};

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

Mimi, perfect

- Anonymous April 18, 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