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

Discussion

enum types are processed by

  • A.Compiler
  • B.Preprocessor
  • C.Linker
  • D.Assembler

Answer: A

Correct answer: Compiler

Enumerations are processed by the compiler. enum is part of the C language proper: the compiler creates a type, assigns integer values to the enumerators and makes them available as integer constants with scope and type.

This distinguishes them from #define constants, which the preprocessor substitutes textually before the compiler sees the source, with no type and no scope. That difference is the main argument for preferring enumerations to macros for related integer constants - they are visible to the debugger and obey the ordinary scoping rules.

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

Post your comment

Please log in or register to post a comment.