Bloomberg LP Interview Questions
- 0of 0 votes
Answersint main()
{int n = 12;
std::cin >> std::hex >> n;
std::cout << std::setprecision(2) <<n;
return 0;
}
- lnpeng December 11, 2009
What would be the output given input is 12?
choice a:
12
choice b:
12.00
choice c:
18
choice d:
18.00
choice e:
1.80e+001| Report Duplicate | Flag | PURGE
Bloomberg LP C++ - 0of 0 votes
Answersclass A {};
void foo()
{throw new A;
}
- c.c. December 11, 2009
Which of the following catch statement is valid?
choice a:
catch (A && e)
choice b:
catch (A e)
choice c:
catch (A * e)
choice d:
catch (A ** e)
choice e:
catch (A & e)| Report Duplicate | Flag | PURGE
Bloomberg LP C++ - 0of 0 votes
AnswersHow would you find the Common elements from 2 Arrays which my or may not be of the same size?
- Saurabh December 11, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Algorithm - 0of 0 votes
AnswersYou have 4 bottles each containing pills that weigh 10 grams each and 1 bottle containing pills that weigh 9 grams each, How would you find out the lighter of the 5 bottles by using a Digital Scale just Once?
- Saurabh December 11, 2009
Hint: He asked to open the bottles and take the pills out, and also grouping them wont work.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Brain Teasers C++ - 0of 0 votes
AnswersDifference between Macro and inline?
- ross December 03, 2009
Why static is not used to define global/local buffer?
write a program to print Fibonacci series?
what is the C++ equivalent of linked list?| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C - 0of 0 votes
AnswersC++ concepts:
- Anonymous November 20, 2009
Virtual functions
Exception Handling
Casts| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
AnswersOptimized way to find an element in a matrix where every row and column is sorted. (Hint: Interviewer expected sort of Binary search but in an optimized and intelligent way)
- Anonymous November 20, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Algorithm - 0of 0 votes
AnswersFind minimum number of characters that need to be inserted into a string (anywhere in the string) to make it a palindrome..(Hint: Interviewer expected a Dynamic Programming kind of solution)
- Anonymous November 20, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Algorithm - 0of 0 votes
AnswersWrite an algorithm to find the number of six digit numbers where the sum of the first three digits is equal to the sum of the last three digits.
- gar November 17, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Software Engineer / Developer Algorithm - 1of 1 vote
AnswersFind if a given integer is a power of 2.Optimize it.
- jack November 15, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer Financial Software Developer Bit Manipulation - 0of 0 votes
AnswersI have a box full of red, blue and yellow balls. The probability of picking a red ball = probability of picking a blue ball = probability of picking a yellow ball = 1/3. The number of balls is large enough that picking one ball doesnt effect the probabilities. If I pick 3 balls at random from the bag, what is the probability that
- Anonymous November 10, 2009
a) I get all 3 red balls?
b) I get 1 red, 1 blue and 1 yellow ball?| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Brain Teasers - 0of 0 votes
AnswersA man has 3 kids. The product of the ages of the three kids is 36. How will you systematically list out the possible combination s for the ages of the kids, without repetition?
- Anonymous November 10, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Brain Teasers - 0of 0 votes
Answers1. What happens when exception is thrown from Destructor?
- Anonymous November 08, 2009
2. Memory layout of an object ( mainly how many bytes for an object with virtual functions ).
3. Finding a longest consecutive subsequence sum.
4. Finding a loop in a linked list
5. Finding the first non-repeating character in a string.| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer - 0of 0 votes
AnswersWhat are some things to take care of when definining - a) Copy constructor b) Assignment operator?
- NJ October 23, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
AnswersDesign anti-virus software.
- Rohan October 08, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Application / UI Design - 0of 0 votes
AnswersWhat is the size of a VPTR? where is it stored?
- Rohan October 08, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Computer Architecture & Low Level - 0of 0 votes
AnswersWhy do you use virtual functions? What is a VTABLE? How does it work?
- Rohan October 08, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C++ - 0of 0 votes
AnswersGenerate a binary search tree from a continuous stream of numbers.
- Rohan October 08, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Trees and Graphs - 0of 0 votes
AnswersWill malloc work if RAM is 5MB , 1st two MBs are full and the 4th MB is full and it has to allocate 1.5 MB of data(basically there is fragmentation).
- Rohan October 08, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Computer Architecture & Low Level - 0of 0 votes
AnswerExplain the difference between structured and object oriented logic
- Rohan October 08, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Object Oriented Design - 0of 0 votes
Answers# Rank the following attributes in order of importance when designing new code. If you have time, please add a sentence to each explaining it's position:
- Anonymous October 08, 2009
* performance
* maintainability
* correctness
* ease of use
* ease of learning| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer System Design - 0of 0 votes
AnswersHow many constructor (including copy constructor) and destructors will be called for test1 and test2?
- bl September 29, 2009#include <iostream> using namespace std; class Base{ public: Base(){cout << "Base()" << endl;} Base(const Base&){cout << "Base(const Base&)" << endl;} ~Base(){cout << "~Base()" << endl;} }; Base func(Base b){return b;} void test(){ Base a; func(a); } void test(){ Base a; Base b = func(a); } int main(){ test1(); test2(); return 0; }
| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ - 0of 0 votes
Answersstd::vector<int> items;
- bigbear September 02, 2009
Referring to the sample code above, how do you remove all elements from the items
collections that are greater than 50?
a. items.erase(std::remove_if(items.begin(), items.end(), std::bind2nd(std::greater<int>(), 50)), items.end());
b. std::remove_if(items.begin(), items.end(), std::greater<int>(50));
c. items.erase(std::remove_if(items.begin(), items.end(), std::bindlst(std::less_equal<int>(), 50)), items.end());
d. items.remove_if(items.begin(), items.end(), std::bind2nd(std::greater<int>(), 50)));
e. items.remove_if_greater(items.begin(), items.end(), 50);| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer C++ - 0of 0 votes
Answershow to reverse a linklist using recursion?
- nav August 07, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer - 0of 0 votes
AnswersWrite a function that removes extra spaces from a string and leaves only one correct space. I got it right the first time so they changed and twisted it a lot.
- fuckubloomberg July 26, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer String Manipulation - 0of 0 votes
AnswersTell me about yourself. What are your strengths and weaknesses?
- fuckubloomberg July 26, 2009| Report Duplicate | Flag | PURGE
Bloomberg LP Financial Software Developer Behavioral