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

Discussion

Can a function return an enumeration constant in C?

  • A.true
  • B.false
  • C.depends on the compiler
  • D.depends on the standard

Answer: A

Correct answer: true

An enumeration constant is an integer constant, so a function can return one exactly as it returns any int - and a function may equally be declared to return the enumeration type itself.

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

Post your comment

Please log in or register to post a comment.