C enum data type example

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

#include<stdio.h>
#include<conio.h>
main()
{
 int roll1,roll2;
 enum standard {FIRST,SECOND,THIRD,FOURTH};
 enum standard s1,s2;

 clrscr();

 printf("
 Enter the roll numbers for two students");
 scanf("%d%d",&roll1,&roll2);

 s1=FIRST;
 s2=FOURTH;  /*assigning the standards*/
 printf("
The Roll Number %d  is in %d st Standard",roll1,s1+1);
 printf("
The Roll Number %d  is in %d th Standard",roll1,s2+1);

 getch();
}