+ 2

What is enum in c

Explain breif

18th Sep 2019, 6:14 AM
SAI REDDY
2 Respostas
+ 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