CS FundamentalsHardProduct-company placement
A mutant changes `if (x > 10 && x < 20)` to `if (x >= 10 && x < 20)`. Which single test input kills (distinguishes) this mutant?
- A. x = 11
- B. x = 15
- C. x = 20
- D. x = 10
Correct answer: D. x = 10
The two versions differ only at x = 10: the original gives false, the mutant true. At 11 and 15 both are true and at 20 both are false, so those inputs leave the mutant alive - which is why boundary tests kill relational-operator mutants.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- After a change to functions f1, f3 and f5, a team wants the smallest regression subset that exercises all three. Tests cover: T1 {f1, f2}…
- What is the minimum number of tests that gives 100% statement coverage of this fragment? python if a > 0: if b > 0: X() else: Y() else: Z()
- A function contains if x > 5: A() followed later by if x < 3: B(), and x is not changed between them. How many entry-to-exit paths are…
- A tester has no reliable way to know the correct output for a complex scientific simulation, so she checks that doubling every input mass…
- In which situation does a suite with 100% decision (branch) coverage still NOT achieve 100% multiple-condition coverage?
- You append line L1 to a tracked file f.txt, run git add f.txt, and then append line L2. Which statement about the three diff commands is…