Skip to content

b. Test Your Knowledge

🧠 Naming Conventions & Internal Documentation

(KK 3.1.9, KK 3.1.11)


🅰️ Section A – Multiple-choice questions

(1 mark each – Section A exam style)

1. What is the primary purpose of using naming conventions in source code?

A. To reduce memory usage

B. To improve code execution speed

C. To make code easier to read and maintain

D. To allow the compiler to detect errors

Answer

C. To make code easier to read and maintain


2. Which variable name correctly follows camel case?

A. total_score

B. TotalScore

C. totalScore

D. total-score

Answer

C. totalScore


3. Which naming convention uses underscores to separate words?

A. Camel case

B. Hungarian notation

C. Snake case

D. Pascal case

Answer

C. Snake case


4. Which variable name best represents Hungarian notation?

A. employeeCount

B. arrEmployeeNames

C. employee_names

D. EmployeeNames

Answer

B. arrEmployeeNames


5. Which of the following is NOT a benefit of internal documentation?

A. Supports future maintenance of the code

B. Helps programmers understand complex logic

C. Improves execution speed of the program

D. Assists new developers reading the code

Answer

C. Improves execution speed of the program


6. Which type of internal documentation is typically placed at the top of a program?

A. Placeholder comment

B. Header comment

C. Inline comment

D. Debug comment

Answer

B. Header comment


7. Why does internal documentation not affect program efficiency?

A. It is removed during testing

B. It is converted into metadata

C. It is ignored by the compiler

D. It is stored outside the program

Answer

C. It is ignored by the compiler


8. A programmer writes the following comment:

// prints the value of total
PRINT total

This comment is considered poor practice because it:

A. Uses incorrect syntax

B. Is too long

C. Repeats what the code already shows

D. Is placed in the wrong location

Answer

C. Repeats what the code already shows


🅱️ Section B – Short-answer questions

(2–4 marks each – Section B exam style)

1. Define what is meant by a naming convention in programming.

(2 marks)


2. Explain two reasons why consistent naming conventions are important in a software solution.

(4 marks)


3. Describe the difference between camel case and snake case naming conventions. Your response must include an example of each.

(4 marks)


4. Explain one advantage and one disadvantage of using Hungarian notation.

(4 marks)


5. Explain the purpose of internal documentation in a software solution.

(3 marks)


6. Identify two best practices that should be followed when writing internal documentation.

(2 marks)


7. Describe what is meant by a placeholder comment (stub) and explain why it is used.

(3 marks)


8. Explain why internal documentation is especially important when software is developed by a team.

(3 marks)


🧠 Examiner-style reminder

  • Use VCAA terminology: readability, maintainability, future developers, compiler ignores comments
  • Avoid vague phrases like "helps people understand" — be specific
  • For 4-mark questions, give two clear, distinct points