Home / C Programming / Declarations and Initializations :: Discussion

Discussion :: Declarations and Initializations

  1. Which of the following is correct about err used in the declaration given below?

     typedef enum error { warning, test, exception } err;

  2. A.
    It is a typedef for enum error.
    B.
    It is a variable of type enum error.
    C.
    The statement is erroneous.
    D.
    It is a structure.

    View Answer

    Workspace

    Answer : Option A

    Explanation :

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


Be The First To Comment