## 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

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.

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

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

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

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

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

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.

### 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.