Placement Papers - Microsoft

Microsoft Corporation
Microsoft Interview Questions Paper (Set-4)
Posted by :
Loveena Rai


(Avg. of 343 ) : If you had an infinite supply of water and a 5 quart and 3 quart pail, how would you measure exactly 4 quarts?

(Avg. of 122 ) : If you could remove any of the 50 states, which state would it be and why?

(Avg. of 78 ) : If you are on a boat and you throw out a suitcase, will the level of water increase? (Avg. of 87 ) : There are 3 ants at 3 corners of a triangle, they randomly start moving towards another corner. What is the probability that they don\'t collide?

(Avg. of 50 ) : Three men were renting a motel figuring the room cost 30 dollars they would pitch in ten a piece.The room was only 25 so they each gave the bell boy ten,(tip)the bellboy didn"t think that would be fair so he gave them each back 1 dollar and kept 2 for himself.What happened to the other dollar?

(Avg. of 1423 ) : What is Operator, Operand, Expression, Statement in \'C\'?

(Avg. of 364 ) : What is polymorphism? Rate it: View Answers (Avg. of 84 ) : What is operator overloading?

(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) [10];a++;

(Avg. of 45 ) : What is wrong with this?main(){int *ptr;*ptr=10;}

(Avg. of 39 ) : Given int n, i=10, j=20, x=3, y = 100; What is the value of n and y at the end of each of the following expressions?a) n = (i > j) && (x < ++y);b) n = (j - i) && (x < y++);c) n = (i < j) (y+=i);

(Avg. of 34 ) : int x = 5; int y = 7; What is the value of x and y after the expression y+=x++;

(Avg. of 58 ) : What\'s the difference between C and C++?

(Avg. of 21 ) : What does Public and Private mean in C++

(Avg. of 59 ) : Is it possible to keep 2 stacks in a single array, if one grows from position one of the array, and the other grows from the last position. Write a procedure PUSH(x,s) that pushes element x onto stack S, where S is one or the other of these two stacks. Include all necessary error checks