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
30
31
32
33
34
|
#include <stdio.h>
void
main()
{
int x;
char *y;
long long z;
x = 0x01020304;
z = 0x0102030405060708LL;
printf("%x\n",x);
y = (char *)&x;
printf("%x\n",y[0]);
printf("%x\n",y[1]);
printf("%x\n",y[2]);
printf("%x\n",y[3]);
printf("Printing z ...\n");
printf("%llx\n",z);
printf("Printing z done\n");
y = (char *)&z;
printf("%x\n",y[0]);
printf("%x\n",y[1]);
printf("%x\n",y[2]);
printf("%x\n",y[3]);
printf("%x\n",y[4]);
printf("%x\n",y[5]);
printf("%x\n",y[6]);
printf("%x\n",y[7]);
}
|