Home » C Programming » C Enumeration (Enum) » Question
  1. Which of the following is correct about emp used in the declaration given below ?

    typedef enum employ {Engineer, Doctor, Manager} emp;
    1. It is a typedef for enum employ.
    2. It is a variable of type enum employ.
    3. The statement is erroneous.
    4. It is a structure.
    5. It is one of the elements of enum employ.
Correct Option: A

A typedef gives a new name to an existing data type.
So emp is a new name for enum employ.



Your comments will be displayed only after manual approval.