Search
 
SCRIPT & CODE EXAMPLE
 

C

enum case statement in c

typedef enum {
    NEG_INF,
    ZERO,
    POS_INF,
    NOT_SPECIAL

} extrema;

int main(){

    extrema check = POS_INF;

    switch(check){
        case NEG_INF: printf("neg inf"); return 1;
        case ZERO: printf("zero"); return 2;
        case POS_INF: printf("pos inf"); return 3;
        default: printf("not special"); break;
    }

    return 0;

}
Comment

PREVIOUS NEXT
Code Example
C :: define constant c 
C :: Compile multiple C files 
C :: fwrite c 
C :: ternary operator in c 
C :: C# special character display 
C :: atoi string to int 
C :: string in c 
C :: Increment & Decrement Operator in C language 
C :: les fichiers en c 
C :: c pointers and arrays 
C :: c get pid 
C :: C Accessing Union Members 
C :: can we use logical operators in switch c 
C :: C/c drop mime 
C :: c program boilerplate 
C :: fork 
C :: can torch light bring change in chemical reaction 
C :: FILE* fptr = fopen("test", "r"); if (__ (fptr)) { printf("End of file reached"). (42); } 
C :: pointeur de pointeur en language c 
C :: ssl_get_servername return null 
C :: c limit value range 
C :: write a c program to find out ncr factor of given number 
C :: BEE/URI problem no 1181 solution in C 
C :: tetris rotate shape 
C :: profile time bash script 
C :: how to reset to read from beginning of file c 
C :: pygraphviz show 
C :: C Syntax of function prototype 
C :: mitch mcconnell 
Dart :: flutter wait for specific time 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =