comparison tests/t08.c @ 28:8a955e3dda2c posted-20101220

two more tests, more fixes
author David A. Holland
date Mon, 20 Dec 2010 05:42:15 -0500
parents
children c24cbfa44f81
comparison
equal deleted inserted replaced
27:01c3a2088ab4 28:8a955e3dda2c
1 #include <stdio.h>
2
3 int d =
4 #if 2 > 1 ? 0 : 0 ? 1 : 1
5 1
6 #else
7 0
8 #endif
9 ;
10
11 int e =
12 #if (2 > 1 ? 0 : 0) ? 1 : 1
13 1
14 #else
15 0
16 #endif
17 ;
18
19 int f =
20 #if 2 > 1 ? 0 : (0 ? 1 : 1)
21 1
22 #else
23 0
24 #endif
25 ;
26
27
28 int
29 main()
30 {
31 int a, b, c;
32
33 a = 2 > 1 ? 0 : 0 ? 1 : 1;
34 b = (2 > 1 ? 0 : 0) ? 1 : 1;
35 c = 2 > 1 ? 0 : (0 ? 1 : 1);
36
37 printf("%d %d %d\n", a, b, c);
38 printf("%d %d %d\n", d, e, f);
39
40 return 0;
41 }