Program to illustrate Enumerated Data Type


#include<iostream.h>
enum Semester {WINTER, MONSOON, SUMMER};
          int main( )
         {
        Semester s1, s2 ;    // Declaration of  variables of type Semester
        s1 = MONSOON ;
        s2 = WINTER ;
        if (s1 == s2)
        cout <<"same semester"<<endl;
           return 0 ;
    }

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|