Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

iSQI Exam CTAL-ATT Topic 9 Question 19 Discussion

Actual exam question for iSQI's CTAL-ATT exam
Question #: 19
Topic #: 9
[All CTAL-ATT Questions]

Consider the following section of pseudocode:

function getPassword() {

var x;

var y;

var z;

var passwordGood = false

// Get password from user, user is allowed 3 tries

do until x = 3

call getPassword (password)

if password is good

x = 3

passwordGood = true

else

X = X + 1

display ''Password is not valid, try again''

endif

If passwordGood <> true

display ''You exceeded the number of tries to enter a password. Your account is now locked. Call customer service.''

endif

endloop

}

For this section of code, which of the following issues should be identified during a code review?

Variables have not been properly defined with meaningful names

There are unused variables defined

Divisors are not tested for zero

Loop counters are not properly initialized

There are endless loops

There are statements within the loop that should be outside the loop

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Portia
2 months ago
Ah, the good old 'password is not valid, try again' message. Bet the user's gonna feel real confident after seeing that five times in a row. Tech support, here we come!
upvoted 0 times
Danica
5 days ago
B) 2, 3, 4, 6
upvoted 0 times
...
Zack
8 days ago
I think the issue is with the variables not having meaningful names and the loop counters not being properly initialized.
upvoted 0 times
...
Callie
9 days ago
B) 2, 3, 4, 6
upvoted 0 times
...
Jennie
15 days ago
A) 1, 3, 4, 5
upvoted 0 times
...
Jesusa
17 days ago
Yeah, those variable names could use some work.
upvoted 0 times
...
Buck
25 days ago
A) 1, 3, 4, 5
upvoted 0 times
...
...
Jeniffer
2 months ago
Statements outside the loop? Rookie move. That's like putting the cart before the horse. Gotta keep that logic tight, you know?
upvoted 0 times
...
Bernadine
2 months ago
Ah, the old 'loop counter not properly initialized' problem. Classic coding blunder right there. Gotta watch out for those endless loops, too!
upvoted 0 times
...
Tamie
2 months ago
Wait, why are we testing for zero divisors? This is a password validation function, not a math equation. Seems a bit off the mark.
upvoted 0 times
...
Kati
2 months ago
Hmm, the variable names could definitely be more descriptive. And what's up with those unused variables? Seems like a rookie mistake to me.
upvoted 0 times
Walker
1 months ago
User2: I agree, they should have used more descriptive names.
upvoted 0 times
...
Tula
1 months ago
User1: Yeah, those variable names are really confusing.
upvoted 0 times
...
...
Annett
2 months ago
I'm not sure, but I think option B might also be correct. It mentions unused variables and statements within the loop that should be outside the loop.
upvoted 0 times
...
Leonora
2 months ago
I agree with Shanda. Option A seems to cover all the issues mentioned in the code review question.
upvoted 0 times
...
Shanda
2 months ago
I think the correct answer is A) 1, 3, 4, 5 because variables should have meaningful names, divisors need to be tested for zero, loop counters should be properly initialized, and there should not be endless loops.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77