Software Testing Flow
Software Testing Flow
1. The for-loop syntax is incorrect. From the code it only has one argument which is the
condition and missing the other two arguments which are the initialization and
increment/decrement counter. The correct syntax for loop is
($i = 0; $i < 32; $1++)
2. There is a syntax error on line 8 the (print_r) statement is missing a closing bracket
before the semicolon. The outcome should be
3. The reverse integer function needs to return the result so the outcome should be return
$result;
4. The outcome should be print_r(reverse_integer(1234). “
Start
Input n
result = 0
i=0
i < 32?
Yes
No
$result << = 1
End
$n >> = 1
Advice as a software tester
Input n
Is n the
power of 2?
End