Bloomberg LP Interview Question for Software Engineer / Developers






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

yes, by declaring them as const.

ex:
extern const int var1;

Here you are only declaring and not reserving memory on initializing.

- AK August 01, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

enum

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

yes Enum is right ans

- sunny August 05, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

#define

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

#define

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

#define

- Vicky September 15, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

#define doesn't declare a variable .

- Frodo Baggins October 31, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Yes. Use a constant reference.

int i=10;
const int &b=i;
b=20;
printf("%d",b);

// gives an error that the value of i cannot be modified.

- rochak.bisaria November 07, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

No that doesn't seem right.
It is true you cant modify the value of b, but you can change the value of i, which indirectly changed the value of b, therefor it is not a const..

- Anonymous May 21, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@Richak,
Reference is always constant :).
there is no such thing as constant reference !!!!!!

- Prasant July 18, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

When you say:

const int &b=i;

That does not mean "constant reference", but "reference to the constant object".

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