Categories: Quant Development

Great tips for those taking Bloomberg Brainbench Previsor c++ online test

(Last Updated On: June 17, 2010)

Find the middle element of a singly linked list
What are your favorite coding features about C/C++?
Answer Question
How would you form an index for a book? i.e. finding the words specified, ordering the page numbers per word (needed to discuss data structures a bit)
More tips from Graham at Velocity Reviews dot com.
I know there a good few companies out there that won’t let you in the
door without an A score in brainbench. www.brainbench.com

It’s easy to get a high score if you study. Be prepared to get a lousy
score first time (unless you’re name is victor bazarov), then you’ll
get a feel for the type of questions they ask (you’ll be disgusted the
first time you take the test). The second time round you’ll be prepared
and will score ok. things that they ask include order of construction
for classes that inherit virtually, using set_new_handler correctly,
being able to parse the syntax for pointers to functions e.g. this type
of stuff (except uglier);

int (* minus)(int,int)

other stuff includes the unnamed namespace, ugly pointer arithmetic,
assumptions about the size of various datatypes (whats platform
specific, what isn’t), exceptions, new style casts (with pointers,
references, unrelated types etc, exceptions thrown when casting
pointers versus bad_cast with references, They offer a sample test at;

http://www.brainbench.com/xml/bb/com….xml?testId=54

as Mister Bazarov says it won’t make you a good programmer but it might
get you to interview stage.

For the record I managed to get the top score of all the candidates
interviewed however the test was in no way a good benchmark of my
ability…. I definitely ain’t that good and struggle a lot of the time
(fook I hope that doesn’t come back to haunt me). Start by taking their
sample test if you’re interested. Don’t pay them any money though. If a
company needs a brainbench score before they interview you, they
usually pay. Victor Bazarovs advice is sound, just program if you want
to be profecient.

more resources:
Brainbench have free C++ tests (and quite a few others)
http://www.brainbench.com/

Loads of interview questions here
http://www.techinterviews.com/interview-questions/c
http://www.techinterviews.com/c-interview-questions-and-answers-3

Online C++ test here
http://www.cprogramming.com/cgi-bin/quiz.cgi

Look at C/C++ Program Perfometer
http://lists.sourceforge.net/lists/l…rfometer-users
that contains various testsuites ( http://lists.sourceforge.net/lists/l…rfometer-users )

Yes have a c++ compiler on hand to retype questions. You have three minutes for each question asked. Do note some questions may be an actual image so that they cannot be copied in text format.
From: http://www.anomalous.net/brainbench.html
int + char = ?
If you care, you cast. In other words, if this is a significant issue in your code, you’re doing something wrong. You shouldn’t assume that the next person to come along will understand type promotion as well as you do. Incidentally, the result is an int.
How do you declare a pointer to a class method?
Seems like a reasonable question, right? Except then you remember the concept behind encapsulation: you really don’t want to look at the implementation of any method in a class hierarchy, since that can really mess you up if you’re handling an object of the wrong type. In other words, this is just something that’s conceptually impure…and likely to lead to problems when you need to maintain the code. If you really, really need to do this, remember that it’s not void (*class::method)(int, int), the way you might expect — it’s void (class::*method)(int, int). To me, in addition to asking about a questionable practice, it’s also a trick syntax question.
What does the “mutable” modifier do?
This is actually a reasonable, but somewhat obscure, question. It’s used on two ways; one that strikes me as poor practice, and one that is important but uncommon. The mutable modifier makes a member variable non-const under all circumstances; it forms an exception even when the surrounding object has been declared const. This is, in my opinion, a Bad Thing To Do; it changes the state of an object that is supposed to be stable. On a positive note, this can be very important as an optimizer hint when dealing with hardware registers. In such a circumstance, you’re really telling the optimizer to make sure it reads the memory location each time it’s accessed, and not to make the assumption that the value hasn’t changed. So 50/50 here, in my book; the sample in the test is an example of misleading coding practices, but the modifier does have value in specific circumstances.
What is a null namespace and how is it used?
This is an obscure question. Null namespaces, or namespaces that haven’t been given a name, are recent additions to the C++ specification and are unfamiliar to many C++ developers. The functionality wasn’t even supported prior to version 4 of g++. Since gcc 3.4.6 is distributed with RedHat Enterprise Linux version 4, this functionality is not widely available to UNIX/Linux developers yet. It’s also one of those very strange things that periodically make it into the language; I’m sure there’s a good reason that it’s there, but I certainly can’t think of it. Null namespaces provide another mechanism for variable scoping; any variables declared in the un-named namespace are local to the file where they were declared, as if they were static. They are accessed as if they weren’t in a namespace at all.

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!
caustic

Hi i there My name is Bryan Downing. I am part of a company called QuantLabs.Net This is specifically a company with a high profile blog about technology, trading, financial, investment, quant, etc. It posts things on how to do job interviews with large companies like Morgan Stanley, Bloomberg, Citibank, and IBM. It also posts different unique tips and tricks on Java, C++, or C programming. It posts about different techniques in learning about Matlab and building models or strategies. There is a lot here if you are into venturing into the financial world like quant or technical analysis. It also discusses the future generation of trading and programming Specialties: C++, Java, C#, Matlab, quant, models, strategies, technical analysis, linux, windows P.S. I have been known to be the worst typist. Do not be offended by it as I like to bang stuff out and put priorty of what I do over typing. Maybe one day I can get a full time copy editor to help out. Do note I prefer videos as they are much easier to produce so check out my many video at youtube.com/quantlabs

Recent Posts

Demystifying Latency: A C++ Deep Dive into High-Frequency Trading

Today, we join Brian, host of quantlabs.net, as he explores the intricate relationship between C++deep…

14 hours ago

High-Frequency Trading: Unveiling the Market Maker’s Dance

Welcome to the fast-paced realm of high-frequency trading (HFT), where milliseconds reign supreme and market…

14 hours ago

You’ve Been Chosen as an Engager!

I am thrilled to inform you that you have been chosen as someone who consistently…

19 hours ago

Tesla Has China Approval Enough to Go Long?

  Tesla's stock price recently soared after receiving "in-principle" approval from Chinese authorities to deploy…

3 days ago

Demystifying Markets, Unveiling Origins of Bitcoin, and Charting the Future

we'll be dissecting the complexities of Forex, exploring the enigmatic origins of Bitcoin, and unveiling…

3 days ago

New Educational Content: Power Up Your Trading

I posted TraderPost.io brand new video educational content playlist on the QuantLabs YouTube channel, offering…

7 days ago