Microsoft Interview Question for Software Engineer in Tests






Comment hidden because of low score. Click to expand.
0
of 0 vote

Some of the simple test cases are
1)Check whether src is not already null
2) check whether there is enough space for dest
to store all the characters in src to dest
3)Check if memory address dest doesn't overlap with the source

- krg85 March 29, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

1: src = NULL and dst = NULL
2: src = NULL and dst != NULL
3: src != NULL and dst = NULL
4: src = dst
5: src and dst overlap
6: src and dst are normal values
7: src is smaller in space than dst
8: dst is smaller in space than src

- Balaji April 01, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Hi Balaji, I have a question about the below test cases
7: src is smaller in space than dst
8: dst is smaller in space than src

Here we are given the starting address for source and dest. How can we check the space of the src OR dest?

- Sadineni.Venkat April 22, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

size of dest must have defined before you call to copy from source to destination. If the source size is greater, the function should not copy at all. There should not be truncation.

- neo August 28, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Check for BOF

- Anonymous August 03, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

strcpy is a banned function at msft

- karthik September 30, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

They don't need Mt Fuji moved either. What is your point?

- LOLer October 01, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Good one ;)

- Karachi is AWESOME January 11, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

LOLer-> strcpy is widely used by hackers. They do by overflowing the buffer for dest.
that is why strncpy is used instead of strcpy.

- HAHAHA November 18, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

You lack sense of humour.

- Mahesh March 26, 2010 | Flag


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More