Which statement about keywords in C and C++ is correct?

Options

  • A. Keywords can be freely used as variable names.
  • B. Keywords have a predefined meaning in the language.
  • C. Keywords must always begin with a capital letter.
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. Keywords have a predefined meaning in the language.

Detailed Explanation

Answer: (B) Keywords have a predefined meaning in the language.

Keywords are reserved words that have a special meaning defined by the programming language.

Examples include int, if, return and while. They cannot normally be used as variable or function names.

Keywords are generally written in lowercase in C and C++, and they are not required to begin with a capital letter.