Machine-translated by Google. Questions are authored in English.
Top

Discussion

All enum constants are

  • A.Same in their scope
  • B.unique in their scope
  • C.contain duplicate values in their scope
  • D.None of the above

Answer: B

Correct answer: unique in their scope

Enumerator names must be unique within their scope, because they share the ordinary identifier namespace - two enumerations at file scope cannot both declare a constant called c. Their values, by contrast, may repeat freely.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.