Microsoft Internship (On-Campus)


Technical Round 1:
warmup questions:
i) Difference between c and c++ and talk about the features of c++?
ii) virtual functions
iii) abstract class

1)Write a function that crawls the hyperlinks present in a website and prints the dead pages?
assuming i have been provided the following functions:
vector <String> hyperlinks_present_in_Webpage(String)
bool is_page_dead(String)

2)How to write an interface in c++ ?

3)Have you worked with api’s?

4)It seems you have limited yourself to curriculum . Any special reasons?

5)Tell about your 2 most challenging pieces of code you have written

6)In ds and algo have i done graph some

any questions?

Technical Round 2:

1)what do you feel is your strongest language/favourite language?
2)how much is your experience in c++?

class parent
void walk()
cout<<” parent walking”;
class child:public parent
void walk()
cout<<” child walking”;
child p;

3)What will be the output of the above code snippet? Will there be any error?

4)Will a constructor allocate memory if it throws an exception?
Write a code to check the above situation if someone is not sure?

5)Difference between overriding and overloading

6) What are the components of a function’s signature(choose): function name, return type, no of arguments and their data type, sequence of the parameters?

class parent

parent(String )
cout<<” parent initialised”;
void walk() // consider its a virtual function
cout<<“parent walking”;

class child:public parent
cout<<“child initialised”;

void walk()
cout<<“child walking”;

7)Indicate which of the numbered statements will compile, run and give the corresponding output

compile(y/n) run(y/n) output

1 parent p=new parent();
2 parent np=new child();
3 child mp=new parent();
4 child cp=new child();

5 p.walk();
6 np.walk();
7 mp.walk();
8 cp.walk();

(i)The statements that will give error how can i modify them so that the program runs and what will be the output.
Assume that I cannot change the parent class.
(ii) difference between writing
parent p;
parent p=new parent();

can I write
if( NULL == p)
in place of if(p == NULL)

(iv) difference between writing
parent *p=new parent();
and, parent &p=new parent();

puzzle :
The interviewer folded a square sheet and tore it in parts, then folded those parts and tore them again.
gave me 10 pieces( 2 pairs of identical triangles, 2 pairs of identical quadrilaterals, two pieces of different triangles)and asked me to form a square

HR round

1)Tell me about your education/schooling

2)Why you want to join microsoft for internship?

3)….. array question

Swap adjacent elements of an array in such a way
that for given
Input: 1 2 3 4 5 6 Output: 2 1 4 3 6 5

4)What will you do to prevent notepad from opening more than one instance.
Write a small code?

5)What is your favourite subject?(give reason)

6)What is your takeaway from the pre placement talk? What did you like in it and Why?

Write your Interview Experience or mail it to

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.