193
|
1
|
|
2 long long gj;
|
|
3 long long gi;
|
|
4
|
|
5 long long a[100];
|
|
6 unsigned long long b[100];
|
|
7 unsigned long long c[100];
|
|
8
|
|
9 long long data[] = {2342342342304234LL,2342342340234234LL, -2342342342340234LL};
|
|
10 unsigned long long udata[] = {2342342334234LL,23423423434234LL,
|
|
11 -234234234234234LL};
|
|
12
|
|
13 long long f(long long i,unsigned long long j,unsigned long long k,long long m,long long a);
|
|
14 unsigned
|
|
15 long long g(long long i,unsigned long long j,unsigned long long k,long long m,long long a);
|
|
16
|
|
17 void
|
|
18 test3();
|
|
19
|
|
20 float f2ll(long long i) { float r;
|
|
21 r = i ;
|
|
22 return r; }
|
|
23 double d2ll(long long i) { double r;
|
|
24 r = i ;
|
|
25 return r; }
|
|
26 float f2ull(unsigned long long i) { float r;
|
|
27 r = i ;
|
|
28 return r; }
|
|
29 double d2ull(unsigned long long i) { double r;
|
|
30 r = i ;
|
|
31 return r; }
|
|
32 long long ll2f(float f) { long long r;
|
|
33 r = f ;
|
|
34 return r; }
|
|
35 long long ll2d(double d) { long long r;
|
|
36 r = d ;
|
|
37 return r; }
|
|
38 unsigned long long ull2f(float f) { unsigned long long r;
|
|
39 r = f ;
|
|
40 return r; }
|
|
41 unsigned long long ull2d(double d) { unsigned long long r;
|
|
42 r = d ;
|
|
43 return r; }
|
|
44
|
|
45 main()
|
|
46 {
|
|
47 int ii;
|
|
48 long long i,k,*p;
|
|
49 unsigned long long j,m,*up;
|
|
50 unsigned long long g0,h0;
|
|
51 long long g1,h1;
|
|
52 unsigned long long sg0,sh0;
|
|
53 long long sg1,sh1;
|
|
54 unsigned long long *pg0,*ph0;
|
|
55 long long *pg1,*ph1;
|
|
56 unsigned long long *psg0,*psh0;
|
|
57 long long *psg1,*psh1;
|
|
58
|
|
59
|
|
60 i = -2343423423424234234LL;
|
|
61 j = 3424223422342234224LL;
|
|
62 k = 44;
|
|
63 k = i*j+3+k;
|
|
64 m = i*j-7+k;
|
|
65 printf("%lld %lld %llu\n",i,k,m);
|
|
66 printf("%lld %lld %llu\n",i,1231234234233LL,m);
|
|
67
|
|
68 g0 = -2343423423424234234LL;
|
|
69 g0++; --g0;
|
|
70 ++g0; g0--;
|
|
71 printf("g0=%lld\n",g0);
|
|
72 g1 = -2343423423424234234LL;
|
|
73 g1++; --g1;
|
|
74 ++g1; g1--;
|
|
75 printf("g1=%lld\n",g1);
|
|
76
|
|
77 sg0 = 2343423423424234234LL;
|
|
78 sg0++; --sg0;
|
|
79 ++sg0; sg0--;
|
|
80 printf("sg0=%lld\n",sg0);
|
|
81 sg1 = -2343423423424234234LL;
|
|
82 sg1++; --sg1;
|
|
83 ++sg1; sg1--;
|
|
84 printf("sg1=%lld\n",sg1);
|
|
85
|
|
86 pg0 = &g0;
|
|
87 ph0 = &h0;
|
|
88 *pg0 = -2343423423424234234LL;
|
|
89 //*pg0++; *--pg0;
|
|
90 //*++pg0; *g0--;
|
|
91 printf("g0=%lld\n",*pg0);
|
|
92 pg1 = &g1;
|
|
93 ph1 = &h1;
|
|
94 *pg1 = -2343423423424234234LL;
|
|
95 //*pg1++; --*pg1;
|
|
96 //++*pg1; *pg1--;
|
|
97 printf("g1=%lld\n",*pg1);
|
|
98
|
|
99 psg0 = &sg0;
|
|
100 psh0 = &sh0;
|
|
101 *psg0 = -2343423423424234234LL;
|
|
102 //*sg0++; *--sg0;
|
|
103 //*++sg0; *sg0--;
|
|
104 printf("sg0=%lld\n",*psg0);
|
|
105 psg1 = &sg1;
|
|
106 psh1 = &sh1;
|
|
107 *psg1 = -2343423423424234234LL;
|
|
108 //*sg1++; *--sg1;
|
|
109 //*++sg1; *sg1--;
|
|
110 printf("sg1=%lld\n",*psg1);
|
|
111
|
|
112
|
|
113 h0 = g0 - 20;
|
|
114 c[33] = g0;
|
|
115
|
|
116 if (i==j) { printf("i==j\n"); } else { printf("i!=j\n"); }
|
|
117
|
|
118 a[33] = i;
|
|
119 b[33] = 2342342342342342342LL;
|
|
120 printf("i=%lld\n",i);
|
|
121 printf("j=%lld\n",j);
|
|
122 i++; --i;
|
|
123 j++; --j;
|
|
124 printf("i=%lld\n",i);
|
|
125 printf("j=%lld\n",j);
|
|
126 gi = 2342342342342342342LL;
|
|
127 gj = 2342342342342342342LL;
|
|
128 gi++; --gi;
|
|
129 gj++; --gj;
|
|
130 printf("gi=%lld\n",gi);
|
|
131 printf("gj=%lld\n",gj);
|
|
132
|
|
133 printf("k=%lld\n",k);
|
|
134 printf("m=%lld\n",m);
|
|
135 printf("a[33]=%lld\n",a[33]);
|
|
136 printf("b[33]=%lld\n",b[33]);
|
|
137 printf("a[33]=%lld\n",++a[33]);
|
|
138 printf("b[33]=%lld\n",b[33]--);
|
|
139
|
|
140 printf("g0=%lld\n",g0);
|
|
141 printf("h0=%lld\n",h0);
|
|
142 printf("c[33]=%lld\n",c[33]);
|
|
143
|
|
144 p = data;
|
|
145 printf("*p++ = %lld\n",*p++);
|
|
146 printf("*++p = %lld\n",*++p);
|
|
147 *p++ = -2342342342342342342LL;
|
|
148 printf("*p-- = %lld\n",*p--);
|
|
149 printf("*--p = %lld\n",*--p);
|
|
150 up = udata;
|
|
151 printf("*up-- = %lld\n",*up--);
|
|
152 printf("*--up = %lld\n",*--up);
|
|
153 *up++ = 65530;
|
|
154 printf("*up-- = %lld\n",*up--);
|
|
155 printf("*--up = %lld\n",*--up);
|
|
156
|
|
157
|
|
158 ii = f(i,j,k,m,a[33]);
|
|
159 printf("f()=%lld\n",ii);
|
|
160 ii = g(i,j,k,m,a[33]);
|
|
161 printf("f()=%lld\n",ii);
|
|
162 test3();
|
|
163 return 0;
|
|
164 }
|
|
165
|
|
166 long long f(long long i,unsigned long long j,unsigned long long k,long long m,long long a)
|
|
167 {
|
|
168 return i+j*k-m/a;
|
|
169 }
|
|
170
|
|
171 unsigned
|
|
172 long long g(long long i,unsigned long long j,unsigned long long k,long long m,long long a)
|
|
173 {
|
|
174 return i+j*k-m/a;
|
|
175 }
|
|
176
|
|
177 void
|
|
178 test3()
|
|
179 {
|
|
180 printf("%g %g %g %g %lld %lld %llu %llu\n",
|
|
181 f2ll((long long ) -3423423234234LL),
|
|
182 d2ll((long long ) -3423423234234LL),
|
|
183 f2ull((unsigned long long ) 34234234234234LL),
|
|
184 d2ull((unsigned long long ) 34234234234234LL),
|
|
185 ll2f((float ) 2342423423423424234LL),
|
|
186 ll2d((double ) 2344234234244234234LL),
|
|
187 ull2f((float ) 2344234234244234234LL),
|
|
188 ull2d((double )2332342343234234234LL)
|
|
189 );
|
|
190
|
|
191 }
|