What is enum in c | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

What is enum in c

Explain breif

18th Sep 2019, 6:14 AM
SAI REDDY
3 Answers
+ 8
Enum is used to assign integral constants. enum name{me,you,us}
18th Sep 2019, 7:15 AM
Aung Thiha
Aung Thiha - avatar
+ 4
enumerator is a user define data type. syntax: enum identifier { v1, v2, .....,vn} ; we can write any program in c language without the help of enum but, enum helps in writing clear codes and simplify programing. example: include<stdio.h> enum week{Mon=1, Tue, Wed, Thur, Fri, Sat, Sun}; int main() {     enum week day;     day = Fri;     printf("%d",day);     return 0; }  Output: 5
23rd Sep 2019, 10:37 AM
Sushil
Sushil - avatar
+ 1
Please do not link unrelated languages in the tags
18th Sep 2019, 6:34 AM
Trigger
Trigger - avatar