11
QuizMultiple Choice

Readable Code — Unit test

Question 11 • VA-Information Technology Fundamentals B

Comments should

Answer
A
give the reader the background of the programmer.
B
be written for every line of code.
C
communicate the purpose of the code that follows it.
D
give information about how many hours it took to write the code.

Explanation

Comments are notes in a program that help people understand the code. A useful comment explains the purpose of the code that follows it, rather than giving personal details or the time spent writing it. Comments are helpful where needed, but they do not have to appear on every line.

AI-written and checked against the verified answer.

Previous
Next