aboutsummaryrefslogtreecommitdiff
path: root/tests2/17_enum.c
blob: 0853c42c0f776137e4aa7b1bb9d452686dd95247 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>

enum fred
{
   a,
   b,
   c,
   d,
   e = 54,
   f = 73,
   g,
   h
};

int main()
{
   enum fred frod;

   printf("%d %d %d %d %d %d %d %d\n", a, b, c, d, e, f, g, h);
   /* printf("%d\n", frod); */
   frod = 12;
   printf("%d\n", frod);
   frod = e;
   printf("%d\n", frod);

   return 0;
}

/* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/