source:
src/tests/expression.c
@
d35e796
Last change on this file since d35e796 was e757af2, checked in by , 8 years ago | |
---|---|
|
|
File size: 476 bytes |
Line | |
---|---|
1 | int main() { |
2 | struct s { int i; } x, *p = &x; |
3 | int i = 3; |
4 | |
5 | // operators |
6 | |
7 | ! i; |
8 | ~i; |
9 | +i; |
10 | -i; |
11 | *p; |
12 | ++p; |
13 | --p; |
14 | p++; |
15 | p--; |
16 | |
17 | i+i; |
18 | i-i; |
19 | i*i; |
20 | |
21 | i/i; |
22 | i%i; |
23 | i^i; |
24 | i&i; |
25 | i|i; |
26 | i<i; |
27 | i>i; |
28 | i=i; |
29 | |
30 | i==i; |
31 | i!=i; |
32 | i<<i; |
33 | i>>i; |
34 | i<=i; |
35 | i>=i; |
36 | i&&i; |
37 | i||i; |
38 | p->i; |
39 | i*=i; |
40 | i/=i; |
41 | i%=i; |
42 | i+=i; |
43 | i-=i; |
44 | i&=i; |
45 | i|=i; |
46 | i^=i; |
47 | i<<=i; |
48 | i>>=i; |
49 | |
50 | i?i:i; |
51 | } // main |
Note: See TracBrowser
for help on using the repository browser.