Horje
enum case statement in c Code Example
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;

}




C

Related
double pointers in c Code Example double pointers in c Code Example
c program to implement mv command Code Example c program to implement mv command Code Example
fatal and non fatal error in c Code Example fatal and non fatal error in c Code Example
two way communication between child and parent processes in C using pipes Code Example two way communication between child and parent processes in C using pipes Code Example
Uri/beecrowd problem no - 1099 solution in C Code Example Uri/beecrowd problem no - 1099 solution in C Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8