Company: Microsoft India

Algorithms & Coding : Microsoft Examination Papers (Avg. of 25 ) : You have b boxes and n dollars. If I want any amount of
money from 0 to n dollars, you must be able to hand me 0 to b boxes so
that I get exactly what I request.” The two questions were “What are
the restrictions on b and n, and how is money distributed among the
boxes?
(Avg. of 49 ) : What is the sum of the numbers from 1 to 1000?
(Avg. of 39 ) : You are an employer. You have ten employees. Each
month, each one of your ten employees gives you ten bags of gold. Each bag
of gold has ten pieces of gold in it. Each piece of gold weighs one
pound. One of your employees is cheating you by only putting nine pieces of
gold in each of his ten bags of gold. You have a scale (not a balance,
a scale), and you can only take one measurement from the scale, only
How can you tell which of the ten employees is cheating you by using
this scale and only taking one measurement?
(Avg. of 38 ) : How many points are there on the globe where by walking
one mile south, one mile east and one mile north you reach the place
where you started.
(Avg. of 23 ) : How would go about finding out where to look for a book
in a library? (You do not know how the books are organized beforehand)
(Avg. of 25 ) : Imagine you are standing in front of a mirror, facing
it. Raise your left hand. Raise your right hand. Look at your
reflection. When you raise your left hand your reflection raises what appears to
too, and does not appear to tilt his/her head down. Why is it that the
mirror appears to reverse left and right, but not up and down?
(Avg. of 21 ) : You have a bucket of jelly beans. Some are red, some
are blue, and some green. With your eyes closed, pick out 2 of a like
color. How many do you have to grab to be sure you have 2 of the same?
(Avg. of 18 ) : You are given a scale which you are to use to measure
eight balls. Seven of these balls have the same weight: the eigth ball
is heavier than the rest. What is the minimum number of weighs you could
perform to find the heaviest of the eight balls?. Remmber it’s a scale
not a balance. (i.e. It can just tell you if one side is heavier than
the other it can’t give you the exact weight).
(Avg. of 13 ) : How would you design a toaster?
(Avg. of 10 ) : How would you design an universal remote control?
(Avg. of 22 ) : How would you design a clock for a blind person?
(Avg. of 30 ) : How many miles of road are there in the US
(Avg. of 64 ) : There are n couples attending a party. Each one shakes
hands with the persons he doesn’t know. (Assuming each person knows
his/her partner) Mary and John are a couple. John asked the rest of the
party-attenders how many times he has shaken hands. Each one gives a
unique answer. How many times does Mary shake hands?

Databases : Microsoft Examination Papers What are two methods of retrieving SQL?
(Avg. of 588 ) : What cursor type do you use to retrieve multiple
recordsets?
(Avg. of 35 ) : What action do you have to perform before retrieving
data from the next result set of a stored procedure?
(Avg. of 36 ) : What is the basic form of a SQL statement to read data
out of a table?
(Avg. of 29 ) : What structure can you have the database make to speed
(Avg. of 16 ) : What is a “join”?
(Avg. of 17 ) : What is a “constraint”?
(Avg. of 11 ) : What is a “primary key”?
(Avg. of 11 ) : What is a “functional dependency”? How does it relate
to database table design?
(Avg. of 15 ) : What is a “trigger”?
(Avg. of 7 ) : What is “index covering” of a query?
(Avg. of 42 ) : What is a SQL view?

Java Questions & Answers (Avg. of 487 ) : What is the difference between an Applet and an
Application ?
(Avg. of 133 ) : What are java beans?
(Avg. of 57 ) : What is RMI?
(Avg. of 28 ) : What gives java it’s “write once and run anywhere”
nature?
(Avg. of 33 ) : What are native methods? How do you use them?
(Avg. of 26 ) : How does Java inheritance wor?k
(Avg. of 58 ) : How many different types of JDBC drivers are present?
Discuss them.
(Avg. of 36 ) : What does the “static” keyword mean in front of a
variable? A method? A class? Curly braces {}?
(Avg. of 34 ) : Class A subclass B subclass C. All override foo(). I
cast C to A and call foo(). What happens? Can C call A->foo()?
(Avg. of 19 ) : Access specifiers: “public”, “protected”, “private”,
nothing?
(Avg. of 18 ) : What does the “final” keyword mean in front of a
variable? A method? A class?
(Avg. of 28 ) : Does Java have “goto”?
(Avg. of 34 ) : Why “bytecode”? Can you reverse-engineer the code from
bytecode?
(Avg. of 31 ) : How does exception handling work in Java?
(Avg. of 64 ) : Does Java have destructors?

C++ Questions : Microsoft Examination Papers (Avg. of 1423 ) : What is Operator, Operand, Expression, Statement in
‘C’?
(Avg. of 364 ) : What is polymorphism?
(Avg. of 55 ) : What are templates?
(Avg. of 72 ) : Declare a void pointer.
(Avg. of 50 ) : Declare a function pointer which takes a pointer to
char as an argument and returns a void pointer.
(Avg. of 31 ) : Type-define a function pointer which takes a int and
float as parameter and returns a float *.
(Avg. of 94 ) : What does the following C statement do?
while(*c++ = *d++); assuming c and d are pointers to characters.
(Avg. of 52 ) : How do you call a C module within a C++ module.
(Avg. of 54 ) : What is the difference between run time binding and
compile time binding? Discuss.
(Avg. of 20 ) : Compare and contrast C++ and Java.
(Avg. of 23 ) : Why does C/C++ give better run-time performance then
Java?
(Avg. of 14 ) : Does C++ come with in-built threading support.
(Avg. of 19 ) : Class A derives B derives C. All have foo(). I cast C
to A and call foo(). What happens?
(Avg. of 27 ) : All classes A, B, C have default constructor, foo()
that calls parent foo() and allocates 100 bytes to their own private local
variable, and a destructor that frees the 100 bytes. I create a C
object and then destroy it. What’s the problem? Did all the memory get
freed? What if I create C, cast to A, and then destroy it. How would I make
sure memory is freed? (destructor must be “virtual” and each destructor
must call parent destructor)
(Avg. of 26 ) : What errors are caught at compile time vs link time?
(Avg. of 30 ) : What is the value of “a” after this?
int (*a) ;
a++;