New Year Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

ISTQB Certified Tester Advanced Level Technical Test Analyst CTAL-TTA Question # 37 Topic 4 Discussion

ISTQB Certified Tester Advanced Level Technical Test Analyst CTAL-TTA Question # 37 Topic 4 Discussion

CTAL-TTA Exam Topic 4 Question 37 Discussion:
Question #: 37
Topic #: 4

Given the following pseudo code for a program to solve quadratic equations:

program Quadratic Formula

integer: a, b, c, d

floating point: r1, r2

READ (a)

READ (b)

READ (c)

d := (b * b) - (4 * a * c)

IF d < 0 THEN

PRINT ("Imaginary Roots")

ELSE

r1 := (-b + sqrt(d)) / (2 * a)

r2 := (-b - sqrt(d)) / (2 * a)

PRINT ("first root is: " r1)

PRINT ("second root is: " r2)

ENDIF

END program Quadratic_Formula

Which of the following checklist items is MOST likely to indicate a problem in this program?


A.

Does the code avoid comparing floating point numbers for equality?


B.

Are all variables properly defined with meaningful, consistent and clear names?


C.

Are there any redundant or unused variables?


D.

Are divisors tested for zero or noise?


Get Premium CTAL-TTA Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.