[ create a new paste ] login | about

Link: http://codepad.org/KmFozb7y    [ raw code | output | fork ]

C, pasted on Oct 8:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>
#include <stdint.h>

#define ADDR_SIZE 8

typedef union {
   unsigned char u8[ADDR_SIZE];
} addr_t;

addr_t global_address1;
char padd1;
addr_t global_address2;
addr_t global_address3;

int main(void) {
  printf("%p\n", (void *)&global_address1);
  printf("%p\n", (void *)&padd1);
  printf("%p\n", (void *)&global_address2);
  printf("%p\n", (void *)&global_address3);
  return 0;
}


Output:
1
2
3
4
0x804971d
0x8049714
0x8049715
0x804970c


Create a new paste based on this one


Comments: