8
AssignmentMultiple Choice

Readable Code

Question 8 • VA-Information Technology Fundamentals B

You are writing a recursive code segment. Which of the following would be the most helpful comment?

Answer
A
This code is recursive.
B
This recursive code counts the nodes in a tree.
C
This is efficient code.
D
The purpose of this code is evident.

Explanation

A helpful comment explains what the code does, not merely that it uses recursion. “This recursive code counts the nodes in a tree” gives the reader useful information about its purpose; the other choices are vague or simply state something obvious.

AI-written and checked against the verified answer.

Previous
Next