Home »» Placement Papers »» All Papers »» Microsoft »» Placement Paper

MICROSOFT PAPER


Java Questions & Answers 

What is the difference between an Applet and an Application? 

What are java beans? 

What is RMI? 

What gives java it's "write once and run anywhere" nature? 

What are native methods? How do you use them? 

(How does Java inheritance wor?k 


How many different types of JDBC drivers are present?

What does the "static" keyword mean in front of a variable? A method? A class? Curly braces {}? 

Class A subclass B subclass C. All override foo(). I cast C to A and call foo(). What happens? Can C call A->foo()? 

Access specifiers: "public", "protected", "private", nothing? 

What does the "final" keyword mean in front of a variable? A method? A class? 

Does Java have "goto"? 

Why "bytecode"? Can you reverse-engineer the code from bytecode? 

How does exception handling work in Java? 

Does Java have destructors?

C++ Questions : Microsoft Examination Papers 

What is Operator, Operand, Expression, Statement in 'C'? 

What is polymorphism? 

What is operator overloading? 

What are templates? 

Declare a void pointer. 

Declare a function pointer which takes a pointer to char as an argument and returns a void pointer. 

Type-define a function pointer which takes a int and float as parameter and returns a float *. 

What does the following C statement do?
while(*c++ = *d++); assuming c and d are pointers to characters. 

How do you call a C module within a C++ module. 

What is the difference between run time binding and compile time binding? Discuss. C h e ta n a S

Compare and contrast C++ and Java. 

Why does C/C++ give better run-time performance then Java? 

Does C++ come with in-built threading support. 

Class A derives B derives C. All have foo(). I cast C to A and call foo(). What happens? 

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) 

What errors are caught at compile time vs link time? 

What is the value of "a" after this?
int (*a) [10];
a++; 

What is wrong with this?
main(){
int *ptr;
*ptr=10;


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); 

int x = 5;
int y = 7;
What is the value of x and y after the expression y+=x++;

What's the difference between C and C++? 

(What does Public and Private mean in C++ 

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. Java Questions & Answers 

What is the difference between an Applet and an Application? 

What are java beans? 

What is RMI? 

What gives java it's "write once and run anywhere" nature? 

What are native methods? How do you use them? 

(How does Java inheritance wor?k 


How many different types of JDBC drivers are present?

What does the "static" keyword mean in front of a variable? A method? A class? Curly braces {}? 

Class A subclass B subclass C. All override foo(). I cast C to A and call foo(). What happens? Can C call A->foo()? 

Access specifiers: "public", "protected", "private", nothing? 

What does the "final" keyword mean in front of a variable? A method? A class? 

Does Java have "goto"? 

Why "bytecode"? Can you reverse-engineer the code from bytecode? 

How does exception handling work in Java? 

Does Java have destructors?

C++ Questions : Microsoft Examination Papers 

What is Operator, Operand, Expression, Statement in 'C'? 

What is polymorphism? 

What is operator overloading? 

What are templates? 

Declare a void pointer. 

Declare a function pointer which takes a pointer to char as an argument and returns a void pointer. 

Type-define a function pointer which takes a int and float as parameter and returns a float *. 

What does the following C statement do?
while(*c++ = *d++); assuming c and d are pointers to characters. 

How do you call a C module within a C++ module. 

What is the difference between run time binding and compile time binding? Discuss. C h e ta n a S

Compare and contrast C++ and Java. 

Why does C/C++ give better run-time performance then Java? 

Does C++ come with in-built threading support. 

Class A derives B derives C. All have foo(). I cast C to A and call foo(). What happens? 

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) 

What errors are caught at compile time vs link time? 

What is the value of "a" after this?
int (*a) [10];
a++; 

What is wrong with this?
main(){
int *ptr;
*ptr=10;


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); 

int x = 5;
int y = 7;
What is the value of x and y after the expression y+=x++;

What's the difference between C and C++? 

(What does Public and Private mean in C++ 

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. 

Comment

0 Answers