2
AssignmentMultiple Select

Readable Code

Question 2 • VA-Information Technology Fundamentals B

Which of the following are recommended ways to find logic errors in code? Choose all that apply.

Answer
A
Check the code line by line.
B
Use the stepping function of your compiler to help you spot the error.
C
Wait for an error message to show you what error is occurring.
D
Run a test scenario with a sample data set to confirm if there is a logic error.

Explanation

Check the code line by line, step through it with a debugging tool, and run a sample test scenario to compare the program’s results with what you expect. These methods can reveal mistakes in the logic even when the code runs without crashing. Waiting for an error message is not reliable because logic errors often do not produce one.

AI-written and checked against the verified answer.

Previous
Next