Microsoft Internship (On-Campus)
Technical Round 1:
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)
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 algorithms.name some
Technical Round 2:
1)what do you feel is your strongest language/favourite language?
2)how much is your experience in c++?
cout<<” parent walking”;
class child:public parent
cout<<” child walking”;
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?
cout<<” parent initialised”;
void walk() // consider its a virtual function
class child:public parent
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();
(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=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();
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
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?