C Programming - Declarations and Initializations - Discussion

Discussion Forum : Declarations and Initializations - Point Out Errors (Q.No. 4)
4.
Which of the following is correct about err used in the declaration given below?
 typedef enum error { warning, test, exception } err;
It is a typedef for enum error.
It is a variable of type enum error.
The statement is erroneous.
It is a structure.
Answer: Option
Explanation:

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

Discussion:
12 comments Page 2 of 2.

Suchi said:   1 decade ago
Someone explain briefly.

Ravi said:   1 decade ago
Give some expalnation please.


Post your comments here:

Your comments will be displayed after verification.