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
Tamie
10 hours agoKati
15 days agoAnnett
18 days agoLeonora
21 days agoShanda
22 days ago