Which statement about C++ header files is correct?

Options

  • A. A header file can be included using the #include directive
  • B. Header files must always use the .cpp extension
  • C. Header files are used only to display output
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. A header file can be included using the #include directive

Detailed Explanation

Correct Answer: Option A

Explanation: Header files are included using #include. They commonly provide declarations shared between source files. They do not have to use the .cpp extension.