[ create a new paste ] login | about

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

C++, pasted on May 24:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>


int main ()
{
    int a [3] = { 16, 2, 77 };

    cout << &a[2] - &a[1] << "\n";

    cout << (int)&a[2] - (int)&a[1] << "\n";

    int b = (int)&a[2];
    b = (int)&b;     

    cout << hex << b << "\n";

    return 0;
}


Output:
1
2
3
1
4
bf9d8c88


Create a new paste based on this one


Comments: