2011 Microsoft Placement Paper - IIBangalore

  • CategoryIT
  • Sub CategoryPlacement Papers
  • LocationBangalore
  • CompanyMicrosoft India
  • Posted date on our Website29 January 2011

User Ratings

3 out of 5 based on 12 Ratings.
Here are the details of 2011 Microsoft Placement Paper - II job in Microsoft India. This job or placement paper has been sourced from either company website or newspaper or other media and from students who appeared for this job. User is requested to verify the data before applying for the job.

Welcome to Microsoft Placement Paper 2009. Here you will find Microsoft Placement Paper Pattern and Download questions of Microsoft Placement Paper 2009 with Answers & Solutions.

2009 Microsoft Placement Paper:-

1. Besides communication cost, what is the other source of inefficiency in RPC? (answer : context switches, excessive buffer copying). How can you optimize the communication? (ans : communicate through shared memory on same machine, bypassing the kernel _ A Univ. of Wash. thesis)

2. Write a routine that prints out a 2-D array in spiral order!

3. How is the readers-writers problem solved? - using semaphores/ada .. etc.

4. Ways of optimizing symbol table storage in compilers.

5. A walk-through through the symbol table functions, lookup() implementation etc. - The interviewer was on the Microsoft C team.

6. An array of size k contains integers between 1 and n. You are given an additional scratch array of size n. Compress the original array by removing duplicates in it. What if k << n?

ANS. Can be done in O(k) time i.e. without initializing the auxiliary array!

7. An array of integers. The sum of the array is known not to overflow an integer. Compute the sum. What if we know that integers are in 2's complement form?

ANS. If numbers are in 2's complement, an ordinary looking loop like for(i=total=0;i< n;total+=array[i++]); will do. No need to check for overflows!

8. An array of characters. Reverse the order of words in it.

ANS. Write a routine to reverse a character array. Now call it for the given array and for each word in it.

9. An array of integers of size n. Generate a random permutation of the array, given a function rand_n() that returns an integer between 1 and n, both inclusive, with equal probability. What is the expected time of your algorithm?

ANS. "Expected time" should ring a bell. To compute a random permutation, use the standard algorithm of scanning array from n downto 1, swapping i-th element with a uniformly random element <= i-th. To compute a uniformly random integer between 1 and k (k < n), call rand_n() repeatedly until it returns a value in the desired range.

10. An array of pointers to (very long) strings. Find pointers to the (lexicographically) smallest and largest strings.

ANS. Scan array in pairs. Remember largest-so-far and smallest-so-far. Compare the larger of the two strings in the current pair with largest-so-far to update it. And the smaller of the current pair with the smallest-so-far to update it. For a total of <= 3n/2 strcmp() calls. That's also the lower bound.

11. If you are on a boat and you throw out a suitcase, Will the level of water increase.

12. Print an integer using only putchar. Try doing it without using extra storage.

13. Write C code for (a) deleting an element from a linked list (b) traversing a linked list

14. What are various problems unique to distributed databases

15. Declare a void pointer

ANS. void *ptr;

16. Set the highest significant bit of an unsigned integer to zero.
ANS. (from Denis Zabavchik) Set the highest significant bit of an unsigned integer to zero
#define zero_most_significant(h) \
(h&=(h>>1)|(h>>2), \
h|=(h>>2), \
h|=(h>>4), \
h|=(h>>8), \
h|=(h>>16))

17. Let f(k) = y where k is the y-th number in the increasing sequence of non-negative integers with the same number of ones in its binary representation as y, e.g. f(0) = 1, f(1) = 1, f(2) = 2, f(3) = 1, f(4) = 3, f(5) = 2, f(6) = 3 and so on. Given k >= 0, compute f(k).

18. A character set has 1 and 2 byte characters. One byte characters have 0 as the first bit. You just keep accumulating the characters in a buffer. Suppose at some point the user types a backspace, how can you remove the character efficiently. (Note: You cant store the last character typed because the user can type in arbitrarily many backspaces)

19. Reverse the bits of an unsigned integer.

ANS.

#define reverse(x) \

(x=x>>16|(0x0000ffff&x)<<16, \

x=(0xff00ff00&x)>>8|(0x00ff00ff&x)<<8, \

x=(0xf0f0f0f0&x)>>4|(0x0f0f0f0f&x)<<4, \

x=(0xcccccccc&x)>>2|(0x33333333&x)<<2, \

x=(0xaaaaaaaa&x)>>1|(0x55555555&x)<<1)

20. Compute the number of ones in an unsigned integer.

ANS.

#define count_ones(x) \

(x=(0xaaaaaaaa&x)>>1+(0x55555555&x), \

x=(0xcccccccc&x)>>2+(0x33333333&x), \

x=(0xf0f0f0f0&x)>>4+(0x0f0f0f0f&x), \

x=(0xff00ff00&x)>>8+(0x00ff00ff&x), \

x=x>>16+(0x0000ffff&x))

About Microsoft India:-

Microsoft entered India in 1990 and has since worked closely with the Indian government, IT industry, academia and local developer community for ushering in some of the early successes in the realm of IT. Microsoft currently has offices in 13 cities - Ahmedabad, Bangalore, Chandigarh, Chennai, Coimbatore, Hyderabad, Indore, Jaipur, Kochi, Kolkata, Mumbai, New Delhi, and Pune. Increasingly, Microsoft is becoming a key IT partner to the Indian government and the industry. Since its advent, Microsoft has been supporting and fueling the growth of the local IT industry through its partner enablement programs. Since its entry into India, Microsoft has focused on three things, namely:

Why Microsoft  India- Why should i join Microsoft India?:-

Microsoft India understand that each employee has unique benefit needs and to meet that we offer flexible benefits. Flexible benefits puts the control in your hands to choose the mix of benefits that best suit you and your family. We make the benefits fit you instead of just offering a standard set of benefits. Here’s a bird’s-eye view.
 
At Microsoft, you’ll have an amazing range of opportunities. You might become an expert in a particular field or build proficiencies across many areas. You might be an individual contributor or become a manager. Because we have so many kinds of jobs in so many different places, you can stay in one building, city, or country, or you can cross borders—in person, or virtually.
 

Contact Details:

Address of Microsoft  India:-

Bangalore: SMSG Office:-

Microsoft Corporation (India) Pvt. Ltd.
Ground Floor & First Floor,
Block E, Signature Building,
Embassy Golf Links Business Park,
Off. Intermediate Ring Road, Domlur
Bangalore - 560 071
Tel: +91-80-66586868
Fax: +91-80-66586575
 
Chennai:-

Microsoft Corporation (I) Pvt. Ltd.
6th Floor, Lancor Westminster
# 108, Dr. Radhakrishnan Salai Mylapore, Chennai - 600004
Tel. +91-44-28473900
Fax. +91-44-28473902
Top
 
Gurgaon:

Microsoft Corporation (I) Pvt. Ltd.
DLF Cyber Greens
9th Floor, Tower A,
DLF Cyber City, Sector 25A
Gurgaon - 122002
Tel.: 91-124-4158000 / 2567000
Fax: 91-124-4158888
 
Hyderabad:-

Microsoft Corporation (India) Pvt Ltd.,
4th Floor, Usha Jubilee Town 36,
8-2-293/82/A/1130/A,
Road No. 36, Jubilee Hills,
Hyderabad - 500 033
Tele No: 66965000
Top


Kolkata:-

Microsoft Corporation (I) Pvt. Ltd.
L & T Chambers
4th Floor, 16 Camac Street,
Kolkata - 700017
Tel. +91-33-22807182
Fax. +91-33-22807191

 
Mumbai:-

Microsoft Corporation ( India ) Pvt. Ltd
Windsor, 4th Floor, Off  CST Road,
Kalina, Santacruz East
Mumbai - 400098
Tel: +91-22-67724000
Fax: +91-22-67724500

 
New Delhi:-

Microsoft Corporation (India) Pvt. Ltd.
Eros Corporate Towers,
5th Floor, Nehru Place,
New Delhi - 110019
Tel: +91-11-46502222
Fax: +91-11-46502020

 
Pune:-

Microsoft Corporation Pvt.Ltd.
Kumar Business Centre,
4th Floor, Survey No.362-3A,
Opp. Pune Central Mall,
Bund Garden Road.
Pune - 411001,
Tel: +91-20-66298900

 

(Disclaimer : This Job or placement paper has been sourced from various sources like print media, Job consultants, past candidates, our users and/ or Company website. The posted date above means the date on which the Job was posted on our site and not on the company site. Users are advised to check with the company for latest requirements before applying for the job. Our website will not be responsible for any loss to the company or the candidate. We have no relation with the company and are not responsible for the validity of this Job. We donot charge the company or candidate or any student anything. If the respective company has any issue with the data provided or they want this particular job or placement paper to be removed they can write into us at infinitecourses@gmail.com)

Comments / Reviews / Queries On

Click to See more Comments