typedef enum color{a,b,c,d,e}co;enum color eee(){ static co x; x=b+c/2; return x;}void main(){ int num; num=eee(); clrscr(); printf("%#d",num); getch();}Output:2ONE MORE EXAMPLEenum color display();void main(){ int c; c=display(); printf("%d",c); getch();}typedef enum color{ black,blue,red,green }symbol; symbol display(){ symbol x=black+green;
No comments:
Post a Comment