Bloomberg LP Interview Question for Financial Software Developers






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

2. struct and class are same except that struct has a member as public by default while class has a member as private by default.

- drwolf February 25, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

in c++ it can. public by default (struct) private by default (class) only difference

- anon March 04, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

You can always add another difference to yours...

struct(s) inheritance is by default public where as
class(s) inheritance is by default private.

- venkat September 27, 2009 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

Reference: has to be initialized when declared
cannot reseat once refer to an object
cannot do arithmetic operation, int& ref=&a, ref++ will be wrong
cannot be assigned with NULL
cannot take the reference of a reference variable, pointter of pointer is possible
As a general rule,
Use references in function parameters and return types to define attractive interfaces.
Use pointers to implement algorithms and data structures.

- creation December 10, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1. pointer could be NULL while reference must be alias for some object; pointer can be reassigned to point to other objects, while reference must always be the alias for the same object.

2. struct has no member function? not sure tho

3. new and delete. new calls constructors while malloc does not

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

agree, I was wrong

- Sheng February 28, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

inheritance in struct is public by default and in class its private by defualt

- gallant March 09, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

In case of C#, Structures and Classes are different because structures are allocated on stack and class objects are allocated on heap. Structures does not support inheritance, as they're implicitly sealed. Furthermore, no member function of a Structure can be virtual, also destructors and finalize methods cannot be written for structures.

- Shahzada Mansoor April 09, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

the only difference between C++ struct and class is that the default data type in class is private whereas its public in case of struct, apart from that rest of the things are same in C++. this is _the only_ difference...

- assHo August 18, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

A reference is essentially a pointer that has already been de-referenced for you.

- vlsi August 31, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

reference is a syntactic sugar when compared to a pointer

- Anonymous September 26, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.


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