Home > C Programming > Quizzes > C Programming Practice Test: Enumerations and Typedefs in C
C Programming Practice Test: Enumerations and Typedefs in C
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 0% Most missed: “We want to create an alias name for an identifier of the type unsigned long. The…”

Quiz on enums and typedef.

Enumerations, also known as enums, are a user-defined data type in C that allows you to define a set of named integer constants. 
Typedefs, on the other hand, allow you to create an alias for an existing data type.

Related Test: C Programming Practice Test: Floating Point & Sizeof Operator in C

C Programming Practice Test: Enumerations and Typedefs in C
Time left 00:00
8 Questions

1. String handling functions such as strcmp(), strcpy() etc can be used with enumerated types.
2. Pick the incorrect statement with respect to enums.
3. A user defined data type, which is used to assign names to integral constants is called ____________
4. Consider this statement: typedef enum good {a, b, c} hello; Which of the following statements is incorrect about hello?
5. We want to create an alias name for an identifier of the type unsigned long. The alias name is: ul. The correct way to do this using the keyword typedef is ____________
6. Which of the following keywords is used to define an alternate name for an already existing data type?
7. Arithmetic operations such as addition, subtraction, multiplication and division are allowed on enumerated constants.
8. One of the major difference between typedef and #define is that typedef interpretation is performed by the _________________ whereas #define interpretation is performed by the _____________