Microsoft Interview Report
- 1of 1 vote
AnswersWrite a function int Compare_Strings(char* str1, char* str2){...} such that the function returns +1, -1 or 0 based on whether str1 is LEXICOGRAPHICALLY greater, smaller or equal to
- Aniruddha Gore November 02, 2008
str2; the comparison should be case-insensitive. For example: "abc" is smaller than "mno" as 'a's ASCII value is less than 'm's. However, "ABC" and "abc" are equal.
Also discuss the test-cases.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test String Manipulation - 2of 0 votes
AnswersIn MS Excel, the column numbers are named as A, B, C, ......, Z. If you go beyond this 'Z' column you will encounter AA-->AZ, BA-->BZ, .... ZA-->ZZ then AAA-->AAZ, ABA-->ABZ, ........ and you can imagine how long this sequence can go! The question was to write a function which takes in a positive integer and
- Aniruddha Gore November 02, 2008
returns the character set at that column. For example: if column number is 26 my function must return 'AA' (0-based index). I basically started looking for any specific pattern if I can find for how many columns names are 1 letter, 2 letter, etc. fortunately there's a pattern involved. I couldn't solve the question completely as we ran out of time but interviewer seemed satisfied as I started by looking for a pattern and not sat down to code without giving a thought.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 1of 1 vote
AnswersWrite code and test cases for reversing a C-style string.
- Aniruddha Gore November 02, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test C String Manipulation Testing - 0of 0 votes
AnswersWrite code and test cases for traversing a linked list.
- Aniruddha Gore November 03, 2008| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Testing Linked Lists