Interview Questions

Write test cases for backspace functionality for MS WORD .......

Software QA/Tests Interview Questions from Microsoft


(Continued from previous question...)

Write test cases for backspace functionality for MS WORD .......

Q:
Microsoft Interview Question for SDE in tests
Write test cases for backspace functionality for MS WORD. At each stroke of backspace how many bytes of data are deleted?


A;
Parse 1 byte (char) from the buffer. Now AND this char with 1000000 and see if this value is non zero. If non zero then it means that the 1st bit of our char is 1, this means that that char is double byte so increment 2 spaces in your buffer or if the AND value is 0 then it means that the 1st bit in our char is 0, so increment 1 space in our buffer.

(Continued on next question...)

Other Interview Questions