--:--









Quiz for Enumerations enum

Course: C Language | Subject: Unit 10 | Topic: Advanced Topics



Logo

Q1: What keyword is used to declare an enumeration in C?

Logo

Q2: By default, what value does the first enumerator have?

Logo

Q3: Can you assign custom values to enumerators?

Logo

Q4: What type is an enum variable in C?

Logo

Q5: Can enumerators have duplicate values?

Logo

Q6: How many enumerators can an enum have?

Logo

Q7: Can an enum variable be assigned a value outside the defined enumerators?

Logo

Q8: What is the size of an enum type?

Logo

Q9: How to define an enum named Color with values RED, GREEN, BLUE?

Logo

Q10: Which header file is required to use enum?

Logo

Q11: Can enums be used in switch-case statements?

Logo

Q12: What happens if you do not assign a value to an enumerator?

Logo

Q13: Are enums strongly typed in C?

Logo

Q14: Can you forward declare an enum in C?

Logo

Q15: What is the use of typedef with enum?

Logo

Q16: How to declare a variable color of enum type Color?

Logo

Q17: Is it possible to print enum values directly?

Logo

Q18: Can enumerators have negative values?

Logo

Q19: What is the scope of enumerators?

Are you ready to start test? Set your time limit