Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

enum in c

#include <stdio.h>

enum week {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday};

int main()
{
    // creating today variable of enum week type
    enum week today;
    today = Wednesday;
    printf("Day %d",today+1);
    return 0;
}
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #enum
ADD COMMENT
Topic
Name
1+3 =