McAfee Interview Question for SDETs


Country: India
Interview Type: Written Test




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

q>0&&q>50
p>o&&p>50

- tarunkumargupta14 January 26, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

you need three values for each p=49,50,51 and q=49,50,51, check with swapping values in test.

- suyambulingam June 12, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

also check for conditions:
p=100 & q=0
p=0 & q=100

- Varsha July 28, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

when p=100&& q=0
p=0 && q=100

- Varsha July 28, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Both true
p+q > 100 -->
(51+50) > 100
p>50

so p = 51 q = 50 will cover both the conditions
now try to fail both the condition

both false
p+q < 100 and p<50
for this you can take p =30 and q = 10.

1st false but second is true
p+q < 100 but p>50
p=51 q = 40

1st true and second false
p+q>100 and p<50
p = 49 and q=70

so this way various execution paths will be covered

- Gaurav Khurana September 02, 2015 | Flag Reply


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