1

i am enclosing the questions that i was asked in Seattle hope it helps u in ur preparation. when it comes to coding questions, they generally ask Linked Lists, Arrays and Strings. Again Strings are nothing but character arrays. Linked lists are important because they want to see if u can handle the pointers. Arrays are nothing but pointers..... so basically it all comes down to ur ability to handle the pointers.

INterview Questions
* Remove from an array S1 all the characters in array s2.
* atoi
* Find the instances of a substring in a string.
* Write a function to put the matching braces/braackets (like the one in emacs editor)
* Find the missing number in a[10000] that has numbers from 1 to 9999
* Compact an array removing the duplicates.
* Brainteasers: Find the distance between 2 buildiings given the length of a rope ...................
* Probablity of picking up marbles from a jar.......... I can explain it in detail if u all want, too lazy just now to explain the whole thing.
* Test the function setpixel(int x, int y)
* Test the Windows NT scheduler (the "At" command)

2.

Reverse a link list. Here be careful of the function prototype you are provided. Try void reverse(node *head) where head points to the head of the list and should point to the head of the reversed list when you return from the function.

Find the largest subarray in an array which has both positive and negative numbers.

Merge two sorted link lists.

Delete all nodes with a particular value from a link list.

Find and delete all occurances of a char from a char array.

Print all the nodes at a particular level in a tree where each node can have a variable no of children. You can assume any structure for the node except that the level of the node cannot be stored in the node.

Backspace when a cahr length is either one or two. If its two the first char is greater than 127 and the char following it can be anything. If its a single char it is less than 127.

Given an 2 dimensional (mXn) array which can have any integer stored in it. Write a filter such any row or column that had a zero in the orignal array is now totally filled with zero. Try to minimise memory usage as much as possible.

given three nos if their product is odd return the min no else return the max no.

Test a Toaster, an Alluminium can, a Hair Dryer.

3

mostly coding..

1. convert an ascill array to integer.. mainly atoi function

2. reverse a linked list

3. function to calculate angle between two hands of a clock

4. write an increment function (pass by pointer and pass by reference)

5. some concept of new and delete (malloc and free)

6. some questions of major coding projects u have done so far(in my case it was advance unix pgm) for all the code u come up with you have to provide test cases to test those functions

7. Difference between const char*, char const*, const char const* etc.

General

1. Test an ATM machine..

2. Simple puzzles that u can find in links i sent b4.. i did not attempt anyone. i said i had already solved them

3. Some important bug you have found so far in codes you have writtten so far..How did you go about finding and solving that bug.. Be ready with some bug you have found.. or try to cook one if you never found any..

4. 1st interview

HR bullshit, told abt my thesis, some std questions like tell abt an occasion when u had to handle more than 1 thing and how u managed...talked abt end of semester rush etc...

2nd lunch interview...
with guy from visual studio tools testing...
talked abt my thesis...asked me how i would take care of security in my project...
then in his office he asked me some puzzles like 2 ropes 30 mins each how to get 45 mins, two dices how to get 31 days of the month, std question abt 8 weights which one is lighter/heavier...i told him i knew the answers to them all...so he sent me to the next interview

3rd: was
short interview, gave me a puzzle/code it was abt 8 queens on a chess board...i told him a non-recursive soln but recrussive would be better ...and then wrote pseudo-code for it...

4th interview

with some guy in NT kernel
again told abt my thesis
then asked me to write itoa() then how to test it..we somehow went to buffer overflow and talked little abt it
then he asked me to write a small assembly program to increment an int...wasnt able to do so ...(i have lot of assembly langs on my resume so he asked me) then he asked me to explain how parameters are passed on to a calling funcition... f(int a, int b) how a and b will be passed/stored on stack..and in which order...i think that depends on the compiler...anyways then he asked me how i would find address of 'a' in the f(int a, int b)
then he asked me explain the multi-threaded keyword program that i had done.. i wrote the pseudo-code for the prod/consumer part of it...
then he asked me to write strstr() ...just some boundary condition thing...

if you want my advice id say atleast look at everything in ur resume... i had left out the assembly languages...

5.

first interview was a HR interview.
all general questions...nothing from resume or technical... questions like.....
* of all courses you have done which is the course which you didnt like...?..then why u didnt like..etc..! I thought not to tell anything...but finally told about genB. told some crap that we dont study in 11 and 12 and so it was difficult in bits..! then obviously she asked what did you do to overcome the difficulty at that time?. and also given a chance for you to do that course again, how will you go about...?
* then...which is the most difficult thing you had faced till now..how you overcame it..etc etc.. told some crap....dont ask me what..!!
* standard question, why microsoft...? again told some crap..1
* why did you choose tamu for your MS..? told something about courses, climate, seniors etc..! Finally she said...you answered well..dont worry and enjoy the rest of the interviews...?

i was being interview for 2 groups... 1)windows sustained engineering group 2)Avalon 1st tech interview..!!
he explained little bit of his group... then asked some questions about my internship in juniper, coop in IBM...! asked some standard question...
did you at anytime had to convince your team mates in anything..how did you do it..?
asked if i had done any courses in OS...then asked diff btwn process and threads..
asked some questions from some other projects..!
then asked me to write a code for the following functions..! int parsestr(char *target, char *pattern) basically have to return the number of times pattern string occured in target string..! as usuall after writing the code, how do you test it..?
then..thats it for this interview.

2nd tech interview...(its a lunch interview...by desi).. this guy started like as if he is not going to interview me at all...and then on the way to lunch in his car.. he asked i am given a key chain of his car (remote opening/closing, trunk opening types)..how would i test it.. told as much as i can..! some of the points i told him are... -pressing all combinations of switches in the key chains.. -pressing them very fast. -testin in adverse conditions...rain, winter, summer -testing the range of the conditions.. -about security, other car key chains shouldnt open this cars lock -effect to humans..prob bcoz of signals.. -check for violations of any regulations (about signal frequency etc)
then asked me a puzzle.. asked me very wagely...adding very stupid masala...like there is one brilliant guy siridhar at microsoft US, and one at hyderabad...! i have to send a secure document..and i cant trust the shipping network. how do i do it..! basically you should ask questions and find out what else can be done.. after a series of questions..he told, you can use a box, locks and keys..! basically the problem boils down to, you can send the key...bcoz a copy will be made... i am feeling lazy to write about other details...so i am just writing the soln of the puzzle which i couldnt answer.. basically the secure document is put in the box and locked and sent..! the guys at hyd put another lock on the box and send it back. the US guy will remove his lock and send it back..! he then asked 2 other puzzles which i knew them already..since this guy is a desi and from IIT kanpur..i thought it better not to act as if i dont know that puzzle and answer it..!
then he asked me that i have to design an airport...how do i go about it..! kept telling some shit..!
then asked which microsoft product do i like most...and then if i am asked to improve something in that product, what will i do..??
finally asked me to answer...why microsoft should hire you in one sentence..?
after this interview i didnt really felt i did well..except for the key chain answer..!

3rd interview..
started with coding..!
* inserting a node in a sorted linked list.
* itoa function then again asked to test them..!

4th interview
* inserting a number in a linked list which is sorted and contains only nodes whose values are among fibonacci numbers. if the requested number is not fibonacci number or if that number is already present then you shouldnt add and return error code.. then said, assume some other guys are testing its functionality...and you are asked to test its performance & stability. this guy was basically a lead for testing in performance and stress.

5th interview
* some string function basically the inputs to the function is a string and a number if string is ABC,DEF,GHI and the number is 2, i have to return DEF. if the number is 3, return GHI. ',' is like a delimiter, and input number 'n' specifies nth string to return. then ofcourse testing it..!!
then asked which microsoft product i like most, what improvements i can suggest..!
then said, microsoft vice president gave a me blank check...and i am asked to come up with something new.. i am not allowed to talk to any customers and enquire about their requirements..!! told about some audio player types..which can do DJ effect, provide features like if i like only the 1st half of the song, i would like to save only that part..! told something about hotmail too...actually in general about managing mailbox folders.. ie being able to delete the attachment but still save the mail..!
finally, again why microsoft should hire me..!

6.

1st interview
*Explain project (werb service and stuff)
*Test a copy command (program) this has flags like -r ( recrusive) -a(copy all fiels including hidden)
*then automate the testing. then improve the effiency of the automated test case.
*then delete a node in a binary tree
*there r 2 containers containing blue and red liquid. A spoon full of liquid is transfered from the red to blue container then a spoon full of liquid is transfered from blue container to red one(remember tis is not all blue liquid it contains a part of red now). Comment about this all process. sol:- is the concentration of red and blue is same in both containers. Do the math...!!!

2nd interview
*questions on resume and automation process used.
*what factors do u look for automating a test case.
*test a notepad , how will you automate it
*word count program
*why testing

3rd
*design a testing system to test a transction server. it can do 3 operations add, delete , update a uder information. and servers many clients. Automate it. check for 24 hrs changing work load.
*how does a windows nt workstation boots up? how is a user authenticated, what is pdc,bdc

4th
*insert a node in sorted double link list. ti has head and tail pointers.
*what is deep copy in c++
*there r 10 bags containing balls, one of them contains ball of less weight. You ar given a digital weighing machine with a accuaracy of .1, how many weight do you need sol:- take N ball from Nth bag and weight etc...
*this is fine for 10 bags .. what will you do for many bags .. like 10,000... sol:- use binary search .. etc ..

 

8.
My MS Onsite Questions:-
HRInterview:-
1)How do you rate yourself in your class(1-10)
2)whats is the prog language you are good at?my ans was C)How do you rate your skills in C prog(1-10)
3)why do you want to work for MS.
4) why testing.
5)Debugging question and test an Hour glass.(Iwas told that these questions are only for the warm up towards the interviews to come and does not affect the hiring).

Ist :-
1) Tell what you did for the project in Web server/client and the performance measure.
2) How do you think internet browsers like IE or Netscape work? how can you modify your client program to work similar to IE or Netscape?
Puzzles:- you walk one mile no East one mile north and one mile west and end up at the same point?
What are the minimum weights required to measure a total of 40lbs using a common balance and what are they?

IInd:-
1) Explain about the byzantine agreement project?
2) what are the practical applications for the protocol and what will you do to make it more efficient?
3)Write a program to convert a string to its ascii equivalent and testcases?

IIIrd:-
1)Write a program to generate the game 
The game has like a 4x4 square having numbers 1-15 in them.The numbers are to be arranged in the following order with the only space
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15
2) how do you test it.

IVth:-
1) Write a program to find the difference between a given date and time Dt1 and Dt2 in years months days and time and the day of the dates assuming you know the day of the current date.
2) How do you test it?
3)Puzzle:- A man has to send the medicine box across a river with a boat man( who is not to be trusted.) to the other end.(its the same old question which was asked for sarada and us for the internship).
4) test a telephone.

Vth:-
1) what did you do in your job at TCS?what did you like the most? what didnt you like?
2) Write a program to eliminate an occurence of the string (str2) from a string (str1);with some extra conditions but I am still not sure what exactly the question was. he somehow made it sound so confusing in the interview.
3) write the test cases for testing the program.

9. HR interview
she told the teams that would be interviewing me.
then asked me to explain about my projects..
what's ur GPA? etc... if ur GPA is low, be prepared to explain..

1st interview.
About my project asked me to find an integer in an array that's not occurring in the range 0-N...

2nd interview.
About my masters' project and some real-time computing stuff related to the project...
find number of bits in an int...

3rd interview.
breadth first search ..implementation of strspn. test it..

4th interview.
he covered all my work related projects..
why microsoft? why testing?
2 simple puzzles ..
he picked up a bottle on his desk and asked me to test it.
what do u test in a s/w product?

5th interview.
what's the difficult question so far?
why microsoft? why testing?
why shud we hire u?
ur mgr has given u a dialog box with an edit box and a OK button. figure out
what that application does?
write a sed game.. - from a bunch of cards with properties (color- R,G,B number-1,2,3, shape-Rec,TR, diamond, fill - solid, #, emty) u have to find whether 3 cards form a sed or not..3 cards form a sed if all their properties are equal or all are different..
10. 1st interview was HR

General questions abt what is your best project and why. What are the skills that u are proud of and that will make you a good software engineer.what do yourfriends say abt ur coding skills.what is the worst project and drawbacks in it . How will u improve onit given a chance.

1st tech interview

1. what is diff between process and thread.

2. how do u make a decision to use a process or a thread.

3. Asked explain how i approached in designing one of my projects( it was a web services project).

4.did u ever miss a deadline, i said No . so he said what did u do to always be on time. Also what if u are given so hard problem that u are sure u will misss the dealine what is your solution to the situation.

I said I will talk to my manager and discuss alternate ways.

5. A C program to return index of first matching string given array of strings in sorted array. Optimize for space and time..

6. tell the OSI protocol stack layers.

2nd tech interview.

Fundas abt networking and security .

more abt how tcp and sockets work .

tell the test cases how a echo server could be vulnerable.

2 simple c progs concentrating on ..

a)one line of code waas having c/*ptr /* was being treated as start of comment instead of division by pointer to an int

b)Malloc was allocating more memory than required and then dereferenceing it.

3rd tech interview

* How will you test a web server bandwidth or something i dont remember.

*Design Cselect class in c++.( lot of concept and design issues esspecially main point to be know is to free all the dynamically allocated memory by various methods.

*tell me how u will test a user interface .

*how do ufind there is a loop in a linked list.

 

11 Round 1. The interviewer asked me about a few things on my resume. Then he asked me to write a program to remove duplicates from a string. He asked me how I would test the code. Then he asked me what modifications I would do to incorporate changes for Unicode. He then asked me to design a way to store names and numbers in a PDA. I was asked about the type of data structure I would use. I suggested a hash table. He agreed with it. He asked me how would I hash on both a name and number. He asked me to write the structure for it. He asked me about hashing, how to test how good a hash function is.
Round 2. This round started with a puzzle. The puzzle was – There is a five digit number – n1. Imagine the number to have been written on a rectangular number plate. If the plate is rotated so that the number is now seen upside down. And the new number is n2. He gave me the difference N2 – n1 and asked me to find n1. The he asked me to code a function Struct node* split(Struct node* list) After the execution of the function list would have all odd nodes and linked list of even nodes is returned. No mallocing and freeing should be done. He asked me how I would test it.
Round 3. It started of with questions on device driver, since I had it on my resume. He asked me about PCI buses. Then I was asked how would I test a coca-cola can. He asked me to write code to insert a node at the start of the linked list. He asked me how I would test it. Then he asked me if this was the process is swapped how would I ensure data integrity, the next time process is swapped in.
Round 4. He asked about a few of my earlier projects. He asked about situations in which I had to work in a team and I had diff ideas that the rest of the team mates. What had happened in those cases. He then asked me to write code to reverse words in a sentence and how I will test it. How will I do it using pointers.
Round 5. This was with the team manager. He asked me 2 puzzles. One was if two trains are traveling at speeds x & y in opposite direction and are distance d apart. A bee starts from one train at speed z and moves towards the other and reverses direction when it hits the second one and continue to do the same till the 2 trains collide. How much dist will the bee travel. If there are 10 jars, and each contain 10 nails. Each nail weighs 10 grams except for nails in one jar, which weigh 9 gms. How to find out the defective jar in one weighing on a digital scale.

12 HR She was very nice and did not ask me any questions at all! Gave me few pointer to remember while attending the interviews, which are not new but hearing them on the interview day was very useful for I day.
Round1
This mainly concentrated on my current job (SDET) and my contributions. we talked about how to introduce automation in no automation environment and what are the problems associated with it. I also explained the new end to end test system I was working on.
Second half was problem solving
Prob 1:
This is a slightly modified version of infinite ball in boxes and one box has less balls of different weight (.1 low or high).
Each ball weights 1 oz There are boxes of class ‘A’ each having 10 ball. There are 10 boxes of category ‘B’ each containing 10 boxes of class ‘A’
We know that in 10 boxes of B one has 10 boxes of type A but all these boxes were packed wrongly. The mistake was that instead of 10 balls they all have 9 balls.
In one weigh find the wrongly packed B type box.
Prob 2:
Given 9 ball and a balance find the ball that is heavier and how many time do you have to weight. If you have N chances to weigh how may ball can you deal with (assuming that only one of them is heavier)?
Round 2:
Write a function to return the angle between 2 hands of clock at a given time.

In the above figure is the setup of your friends cable setup. One fine day he calls you up and says that he is busy and asks you to tape his favorite show on his favorite VCR (VCR3). You walk into house 5 mins before the show and find that there is static on the TV. What do you do then?
Round 3:
Write a function to return the Hex equivalent of an integer.
Write a function to check if given binary tree is balanced.
Round 4: Lot of management questions
What is you favorite MS product? windows.
Why? Easy of use.
Favorite component? Auto device drive detection.
How do you test it?
Coding : a string contains an error number each error number is of the format EXXXXX…. where XXXX is a number. Write a function to check if an error number exists in a string and if it does check if it is between 1 and 12 and if it is return the error code.
Round 5: Questions on requirement gathering.
A string contains token’s %XXXX% and each of XXXX is an environment variable. Write a function to return the string containing the equivalent string with values.
Round 6:
Questions on favorite/toughest project
He explained me exchange servers routing and asked to test it.
13 Teams: Avalon and Networking
The day started with the traditional HR round. It was different tho' as my HR was late, she just explained the day to me and done...no questions!!
Round1:
The interviewer asked me asked me about my research work and what one of my projects. Then he asked me some situational questions. He asked me to test strstr() function. There was no coding question in the interview, as we spent more time on my projects.
Round2:
This was more coding!! we started with some introduction then I was asked to write test cases for testing a program - FTP Client and Server both. earlier we had discussed about its design. Then I was asked to code removeElem(int key, struct node **head). I was supposed to handle removal of all the elements matching . I was asked to test it. I was asked to test a Coke vending machine.
Round3:
Lunch Interview. We drove to a restaurant nearby and discussed the teams work in general and the work done by the interviewer himself. He was into HTTP stack and I had done a HTTP proxy in one of my school projects. So he started asking me questions about the design and what features we had in it. how did we test it. some design issues like how wud you handle caching in a forked proxy server. Ans: shared memory or shared directory. then general questions abt my research and behavioral like how do you tackle non-agreement in a team.
Round4:
This guy was really impressive. He told me abt his work which i really got interested. He asked me to code strstr(). He asked me about two of my projects which were similar to what he was working on. Then he asked me a puzzle - 2 poles 100m long and a rope hanging between them which is 150m long. The closest point of the rope from the ground is 25m from the ground. What is the distance between the poles?? He asked me one more puzzle: 50 red and 50 blue marbles. how to maximize the probability of chosing red marble when given 2 jars where we can put the marbles? Then we had some discussion about one of my project.
Round5:
He asked me all sorts of behavioral questions like why MS, where do you see yourself in 3-4 yrs. He asked me to test line(x1,y1,x2,y2). Then he asked me to come up with 5 best test cases for the same. He was happy with that. Then he gave me a puzzle - 9 marbles find the heaviest/lightest. how many weighings??
Then general discussion about my interests and the teams work.