📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    What is the primary benefit of using comments in

    code?
    A To make the code run faster. Correct Answer Incorrect Answer
    B To explain complex logic, assumptions, or design decisions, improving code readability and maintainability for humans. Correct Answer Incorrect Answer
    C To prevent compilation errors. Correct Answer Incorrect Answer
    D To automatically generate unit tests. Correct Answer Incorrect Answer
    E To hide sensitive information. Correct Answer Incorrect Answer

    Solution

    Comments are for human readers. They help explain the "why" behind the code, clarify non-obvious logic, document design choices, and provide context that might not be immediately apparent from the code itself. This significantly improves code readability and maintainability for current and future developers.

    Practice Next
    ask-question