Have been interviewed for Microsoft India, Hyderabad location for their IT team for Software Engineer role.
Following questions were asked in the first round telephonic interview
1. How is C++ better than C?
2. When do you use overloaded functions and when do you use overrided functions?
3. I have a list of customer objects which in turn can contain a list of Order objects which in turn can contain a list of Item objects. Need a Reporting module that will be total amount of purchase done by each customer and total amount of purchase done by all the customers. What modifications has to be done in the classes?
Ans: Gave few approaches but he was not satisfied.
4. There are three different types of users – employee, admin and manager. Each user should have different permissions. How will you achieve this?
Ans: Users will be the base class. Employee, admin and manager will be the derived classes. I was not sure of how to do this in the interview. But, thinking now. We can have overriden functions in each class of admin/employee/manager such that if the user does not have permission the function in that particular class can just return error without performing any action. If the user has permission, the actions can be defined in that function.
5. Given a linked list, reverse the nodes from (n-x)th node. Given only x.
Ans: Have two pointers. One pointer will be at the head node, increment the second pointer until it reaches xth node. Now increment both the pointers until the second pointer reaches end of the linked list. Now reverse the linked list from the first pointer location onwards
6. In class car, accelerate() is a method that increases the velocity variable each time the method is called. The requirement is to alert the user when the velocity reaches it’s maximum limit.
Ans: I told that we can change the accelerate() method to return a bool var of True whenever the limit is reached. He asked for other ways. I told the user can keep polling every time if the maximum limit has reached or not. He is not satisfied.
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
- Microsoft Interview Experience | Set 132 (Software Engineer for Bing Team)
- Microsoft Interview Experience | Set 90 (Software Engineer role in Bing Team)
- Microsoft Interview Experience for Azure Team Hyderabad
- Microsoft Interview experience for full time position of software engineer at Microsoft Ireland Research
- Microsoft Interview Experience | Set 58 (For Software Engineer)
- Microsoft Interview Experience | Set 55 (For Software Engineer 2)
- Microsoft Interview Experience | Set 137 (For Software Engineer II)
- Microsoft Interview Experience | Set 152 (IDC Software Engineer II)
- Microsoft Interview Experience | Set 72 (For Software Engineer)
- Microsoft Interview Experience | Set 165 (Software Engineer)
- Interview with Microsoft O365 team- Bangalore
- Microsoft IDC Bangalore Interview | Set 153 (O365 Team)
- Amazon Interview Experience | Set 152 (Kindle Team SDE-1 )
- Interview Experience with Sandisk for SD Card team (C Programming)
- Bharti SoftBank (Hike) Interview Experience | Set 5 (Off-Campus for Portal Team)