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 # 36 Topic 4 Discussion

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

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

A review of the following pseudo code is to be performed using a checklist:

Module Vowel Counter

Message: array of Characters

M, N: Integer

ACount, ECount, ICount, OCount, UCount: Integer

BEGIN

I=1

Read Nextchar

While Nextchar <> 'S'

DO

Message (I) = Nextchar

I = I+1

Read Nextchar

ENDWHILE

FOR M = 1 To I

DO

Print (Message(M))

IF Message (M) = 'E'

THEN

ECount = ECount + 1

ELSE

IF Message (M) = 'A'

THEN

ACount = ACount + 1

ELSE

IF Message (M) = 'I'

THEN

ICount = ICount + 1

ELSE

IF Message (M) = 'O'

THEN

OCount = OCount + 1

ELSE

IF Message (M) = 'U'

THEN

UCount = UCount + 1

ENDIF

ENDIF

ENDIF

ENDIF

ENDIF

ENDFOR

Print ('Message contains ' ACount + ECount + ICount + OCount + UCount ' vowels')

END

Which of the following checklist items would find code errors in this scenario?

A) Are all variables properly declared?

B) Are all loops, branches, and logic constructs complete, correct, and properly nested?

C) Are all cases covered in an IF-ELSEIF, including ELSE or DEFAULT clauses?

D) Are loop termination conditions obvious and invariably achievable?

E) Are there any redundant or unused variables?


A.

b and c


B.

a and e


C.

c and d


D.

a and d


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.