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
Kati
13 days agoAnnett
17 days agoLeonora
20 days agoShanda
21 days ago