Bloomberg LP Interview Question for Financial Software Developers






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

why does Bloomberg ask these stupid questions which have no use in practical life.

- NK October 02, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Are the declarations in the same file?

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

same file wont compile

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

It compiles in visual c++ 2008

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

Yes ,both pick up internal linkage

- nks February 27, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Actually it depends on whether you use the function or not. This will compile with both statements because the local declaration shadows the scope of the external declaration. However, if the function is actually used, there has to be an actual definition of the function somewhere. Neither of these two statements provide such a definition.

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

It compiles, but doesn't link if the funciton is called.

- trm March 18, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

When extern is put in front of a variable it means that the memory for the variable is some where else.When extern is put before a function, what exactly does this mean ?That the function body is some where else ??

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

extern in front of a function prototype is a no-op (it makes no difference); it's all just declaration (apart from 'extern "C" ' forms, that is). extern makes a difference for variables only.

int x; // defined, ie allocated space, here.
extern int y; // declared here - we know there's a y that's an int that we can expect at link time.

// this link says as much, by its silence. I've found the site reliable.

***.cppreference.com/wiki/keywords/extern

And, you can have as many declarations of the same function as you like (for convenience with header files) so, having 2, one with extern and one without really makes no difference.

dfmcla's Feb 28: "This will compile with both statements because the local declaration shadows the scope of the external declaration." - no shadowing happens, the 2nd is just an extra declaration. The compiler will nod, shrug and continue.

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

extern void asprint(int *ia, int sz);
void asprint(int *ia, int sz); // okay, compiler ignores the word "external", i.e.it does not make any sense for function definitions

void asprint(int *ia, int sz);
void asprint(int *ia, int sz); // okay, we ignore the second definition, as it it the same as the first one


void asprint(float *ia, int sz);
void asprint(int *ia, int sz); // still okay, function overloading

int asprint(int *ia, int sz);
void asprint(int *ia, int sz); // OOPS! function redefinition with different returning type! Error!

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

extern void print(int ia, int sz); void print(int *ia, int sz);

- Anonymous April 29, 2021 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

extern void print(int *ia, int sz);void print(int*ia, int sz);

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

A

- Anonymous June 07, 2021 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

extern void print(int ia, int sz); void print(int *ia, int sz);

- Anonymous April 29, 2021

- Anonymous June 14, 2021 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

extern void print(int ia, int sz); void print(int *ia, int sz);

- Anonymous June 14, 2021 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

extern void print(int *ia, int sz);
void print(int *ia, int sz);

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

extern void print(int *ia, int sz);
void print(int *ia, int sz);

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

{{}}

- Anonymous February 27, 2022 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Yes it will compile

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

Write a following code complile ? If not what will be the error?
extern void print (int *ia, int sz); void print (int *ia, int sz)

- Anonymous February 01, 2023 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

No

- No November 15, 2023 | 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