Enumeration or enum in C


Enumeration (or enum) is a user defined data type in C. It is mainly used to assign names to integral constants, the names make a program easy to read and maintain.

Source Code

//enumeration or enum in c
 
#include<stdio.h>
enum Bool{No=10,Yes=20};
int main()
{
    enum point {x=25,y};
    enum Bool a;
    enum point b;
    a=Yes;
    b=y;
    printf("\na : %d",a);
    printf("\nb : %d",b);
 
   return 0;
}
 
 
To download raw file Click Here

List of Programs


Sample Programs


Switch Case in C


Conditional Operators in C


Goto Statement in C


While Loop Example Programs


Looping Statements in C

For Loop Example Programs


Array Examples in C

One Dimensional Array


Two Dimensional Array in C


String Example Programs in C


Functions Example Programs in C


Learn All in Tamil © Designed & Developed By Tutor Joes