Interview: Software Engineer at Microsoft (02-09-2010)

Since 2008, I’ve  made three interviews with Microsoft. This interview was special one because it was full of technical instead of previous interviews. In this post I’ll give a brief about questions that I’ve been asked in the interview.

You can read this document to know more about tips of Microsoft interviews: Tips about MS Phone Interviews

  1. Why you’d like to work in Microsoft?
  2. Why you’d like to work in Artificial Intelligence? (They know that I was interested in this field)
  3. Rank yourself out of 10 in C++
  4. What’s the difference between Structs and Classes?
  5. When writing a public member function in a class, does every object has it’s own copy of it?
  6. When an object calls a member function that operates on it’s member data, how does this function determines that it’s using this object’s data?
  7. What’s the difference between creating an object using new keyword and without?
  8. In which memory storage the compiler put the object created by new and created without it?
  9. What’s the size of this union
    union DATA
    char a;
    byte b;
    int    d;
    My answer was 4 bytes (assuming that int is 4 bytes)
  10. So, what’s the special feature in union’s that differentiates it from structs?
  11. Develop a function that’s similar to atoi function. Below was my code:
    int* Atoi(char* c)
    int x = 0;
    if(*c < 48 || *c > 48+9) return NULL;
    x *= 10;
    x += *c – 48;
    return &x;
    } // NB: this function has a bug, discover it yourself! 😀
  12. Suggest a sorting algorithm to sort two arrays.
    My answer was Selection Sort.
  13. What’s the complexity of that algorithm?
  14. So, if the two arrays was ordered before sorting them, does this will change the complexity of that algorithm
  15. Can you suggest a better sorting algorithm?
    My answer was Quick Sort and Radix Sort.
  16. Tell me how quick sort work?
  17. What’s the complexity of it?
    O(n lg n)
  18. Do you’ve any questions?
    I’ve asked him:
    1) What are challenges facing you working in CLR?
    2) I’ve asked him about merging AI in CLR (especially in Garbage Collection and Thread Sync.)

13 thoughts on “Interview: Software Engineer at Microsoft (02-09-2010)

  1. Gazak Allah Kol 5er Abd Al rehman 4 spreading this knowledge
    Actually i know the answers of 13 Question from these 18 :D.

  2. بالتوفيق ان شاء الله و تدخل المرحلة التانية… بس لماذا انت عاوز تشتغل في ال AI?? 🙂

    • Thanks Abdelmonem. Below are reasons for picking AI:
      1) Open and promising field.
      2) Attractive and interesting output.
      3) I’ve good and suitable environment in it.
      4) Varity of applied fields (Games, Web, OS, Medicine…).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s