52_unnamed_enum.c 420 B

12345678910111213141516171819202122232425262728
  1. #include <stdio.h>
  2. enum fred { a, b, c };
  3. int main()
  4. {
  5. printf("a=%d\n", a);
  6. printf("b=%d\n", b);
  7. printf("c=%d\n", c);
  8. enum fred d;
  9. typedef enum { e, f, g } h;
  10. typedef enum { i, j, k } m;
  11. printf("e=%d\n", e);
  12. printf("f=%d\n", f);
  13. printf("g=%d\n", g);
  14. printf("i=%d\n", i);
  15. printf("j=%d\n", j);
  16. printf("k=%d\n", k);
  17. return 0;
  18. }
  19. /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/