Interview Questions

Microsoft Interview Questions 4

Microsoft Interview Questions and Answers


(Continued from previous question...)

Microsoft Interview Questions 4

  1. If a bear walks one mile south, turns left and walks one mile to the east and then turns left again and walks one mile north and arrives at its original position, what is the color of the bear.
  2. Given a rectangular cake with a rectangular piece removed of any size or orientation, how would you cut the remainder of the cake into two equal halves with one straight cut of a knife?
  3. There are 3 baskets. one of them have apples, one has oranges only and the other has mixture of apples and oranges. The labels on their baskets always lie. (i.e. if the label says oranges, you are sure that it doesn’t have oranges only,it could be a mixture) The task is to pick one basket and pick only one fruit from it and then correctly label all the three baskets.
  4. You have 8 balls. One of them is defective and weighs less than others. You have a balance to measure balls against each other. In 2 weighings how do you find the defective one?
  5. Why is a manhole cover round?
  6. How many cars are there in the USA?
  7. You’ve got someone working for you for seven days and a gold bar to pay them. The gold bar is segmented into seven connected pieces. You must give them a piece of gold at the end of every day. If you are only allowed to make two breaks in the gold bar, how do you pay your worker?
  8. One train leaves Los Angeles at 15mph heading for New York. Another train leaves from New York at 20mph heading for Los Angeles on the same track. If a bird, flying at 25mph, leaves from Los Angeles at the same time as the train and flies back and forth between the two trains until they collide, how far will the bird have traveled?
  9. You have two jars, 50 red marbles and 50 blue marbles. A jar will be picked at random, and then a marble will be picked from the jar. Placing all of the marbles in the jars, how can you maximize the chances of a red marble being picked? What are the exact odds of getting a red marble using your scheme?
  10. 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 be his right hand. But when you tilt your head up, your reflection does 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?
  11. You have 5 jars of pills. Each pill weighs 10 gram, except for contaminated pills contained in one jar, where each pill weighs 9 gm. Given a scale, how could you tell which jar had the contaminated pills in just one measurement?
  12. If you had an infinite supply of water and a 5 quart and 3 quart pail, how would you measure exactly 4 quarts?
  13. 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?
  14. Which way should the key turn in a car door to unlock it?
  15. If you could remove any of the 50 states, which state would it be and why?
  16. There are four dogs/ants/people at four corners of a square of unit distance. At the same instant all of them start running with unit speed towards the person on their clockwise direction and will always run towards that target. How long does it take for them to meet and where?
  17. How would you deal with changes being made a week or so before the ship date?
  18. How would you deal with a bug that no one wants to fix? Both the SDE and his lead have said they won’t fix it?
  19. Write a function that counts the number of primes in the range [1-N]. Write the test cases for this function?
  20. Write a function that inserts an integer into a linked list in ascending order. Write the test cases for this function?
  21. Test the save dialog in Notepad?
  22. Write the InStr function. Write the test cases for this function?
  23. Write a function that will return the number of days in a month (no using System.DateTime)?
  24. Why do you want to work for Microsoft?
  25. Write the test cases for a vending machine?
  26. You are in a building, and you want to know what the temperature is outside. How do you do it?
  27. I am a venture capitalist providing you with money for a remote-control start up firm. Design a remote control that will make me rich?
  28. How many Microsoft engineers does it take to screw in a light bulb?
  29. If you were to move the UC Berkeley campus into the San Francisco business district, what would you do?
  30. How would you test a new elevator that will be placed into a hospital, but you don’t have access to the hospital?
  31. Suppose that I have a closet with a base area of 4ft by 8 ft, and a height of 10ft, and that the closet is completely filled with quarters. Now I take out that closetful of quarters and stack them atop each other, one by one. Will the resulting stack be higher, lower, or about the same height as the Empire State Building?
  32. How would you design a coffee-machine for an automobile?
  33. How would you go about building a keyboard for 1-handed users?
  34. If you had a clock with lots of moving mechanical parts, you took it apart piece by piece without keeping track of the method of how it was disassembled, then you put it back together and discovered that 3 important parts were not included; how would you go about reassembling the clock?
  35. Why is it that when you turn on the hot water in any hotel, for example, the hot water comes pouring out almost instantaneously?
  36. You have been assigned to design Bill Gates bathroom. Naturally, cost is not a consideration. You may not speak to Bill?
  37. Tell me the courses you liked and why did you like them?
  38. Give an instance in your life in which you were faced with a problem and you tackled it successfully?
  39. What is your ideal working environment?
  40. Why do you think you are smart?
  41. Do you want to know any thing about the company?
  42. How long do you want to stay in USA and why?
  43. What is your geographical preference?
  44. What are your expectations from the job?
  45. Design a cellphone for a blind person?
  46. Design a music system for a car. What are the features? Draw a picture?
  47. Design a GPS navigation unit for a hiker?
  48. Design a communication device for Canadian park rangers?
  49. Design a remote control for an automatic window-blind system?
  50. Design TV Remote Control with Two Buttons?
  51. Design a coffee maker that will be used by astronauts?
  52. Design an alarm clock?
  53. Design an alarm clock for a blind person?
  54. Design a search function?
  55. Design a website for a library?
  56. Design an ATM for children?
  57. What method would you use to look up a word in a dictionary?
  58. What are examples of poorly designed software?
  59. Design an instant messaging system?
  60. I am your grandmother. Describe what MATLAB is to me?
  61. How would you explain what a database is to a 5-year-old?
  62. How would you explain computer networking to a kindergarten kid?
  63. What is your favourite software, and how would you improve it?
  64. Write code for an electronic messaging board. What happens when a user logs on?
  65. Develop an algorithm for selecting objects in Visio?
  66. Tell me about a time when you made a decision and later found out that it was incorrect. What did you do to resolve the issue?
  67. Suppose you are one week away from the product shipping date and discover a bug in your software. What do you do?
  68. You have a linked list and don’t know how long it is; how do you find the middle of it?
  69. How would you test a keyboard?
  70. How would you test a pen?
  71. Write code for finding a duplicate in an array?
  72. Write code that returns the length of a string without using any built-in functions?
  73. Reverse a Singly Linked List with and without using Recursion?
  74. Determine if a Binary Search Tree is well formed?
  75. Reverse every word in a String (abc def becomes cba fed)?
  76. Write a function that returns the angle between the hour and the minute hands of a clock, given input of the time?
  77. Write a function that takes a string consisting of numeral characters and returns all possible alpha character strings of same length as input that correspond to the keypad of a typical telephone?
  78. Imagine you have a closet full of shirts. It’s very hard to find a shirt. So what can you do to organize your shirts for easy retrieval?
  79. How would you test a program that takes in two points and outputs the distance between the two points?
  80. Test the Windows scroll bar?
  81. Switch every pair of words in a string (“ab cd ef gh” becomes “cd ab gh ef”)?
  82. Write the function for strstr function (finding a substring inside a string)?
  83. Reverse the order of words in a string (“ab cd ef gh” becomes “gh ef cd ab”)?
  84. Write the function for string comparison. How would you test it?
  85. Write a function to zero all duplicate values in an integer array. How would you test it?
  86. Write a function that compares two strings and returns a third string containing only the letters that appear in both?
  87. Design and implement a garbage collector in c++.

Other Interview Questions