source: doc/theses/jiada_liang_MMath/test1.c @ 8cb2ff6

Last change on this file since 8cb2ff6 was 1725989, checked in by Peter A. Buhr <pabuhr@…>, 5 months ago

add enumeration test programs for different programming languages

  • Property mode set to 100644
File size: 183 bytes
Line 
1#include <stdio.h>
2const enum E { A = 42 };
3enum E e = A;
4enum(double) D { A = 42.5 };
5enum D d = A;
6int main() {
7        int i = e;
8        double j = d;
9        printf( "%d %d %g %g\n", e, i, d, j );
10}
Note: See TracBrowser for help on using the repository browser.