Search
 
SCRIPT & CODE EXAMPLE
 

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;
}
Comment

enum example c programming

// An example program to demonstrate working
// of enum in C
#include<stdio.h>
  
enum week{Mon, Tue, Wed, Thur, Fri, Sat, Sun};
  
int main()
{
    enum week day;
    day = Wed;
    printf("%d",day);
    return 0;
}
Comment

enum in c language

// An example program to demonstrate working
// of enum in C
#include<stdio.h>
 
enum week{Mon, Tue, Wed, Thur, Fri, Sat, Sun};
 
int main()
{
    enum week day;
    day = Wed;
    printf("%d",day);
    return 0;
}
Comment

C enums

enum flag {const1, const2, ..., constN};
Comment

PREVIOUS NEXT
Code Example
C :: remove string from string c 
C :: mpi example 
C :: c read file content 
C :: c/c++ windows api download file 
C :: create role in psql with password 
C :: c header file example 
C :: responsive form bootstrap 4 
C :: Bootstrap textarea from 
C :: fgets c 
C :: int to double c 
C :: sort names in array in c 
C :: c remove last charachter from string 
C :: qtableview get selected row 
C :: function array median 
C :: #define f_cpu 
C :: iterate through enum in qt 
C :: sizeof file c 
C :: refresh a chromebook terminal 
C :: tuples in c 
C :: c malloc array 
C :: writing structures in c 
C :: how to input a string into a char array cpp 
C :: lxde automatic login 
C :: cast from float to long c 
C :: how to find adam number uasing loop in C 
C :: divide a linked list into three parts based on their position mod 3. 
C :: convert c to python online 
C :: Uri/beecrowd problem no - 1131 solution in C 
C :: how many archaeologists are there 
C :: counting 7s in an integer c 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =