C pointers & Ksplice challenge

Published 10-19-2011 00:00:00

C pointers & Ksplice challenge

The Ksplice Pointer Challenge.

#include <stdio.h>

int main() {
    int x[5];
    printf("%p\n", x);
    printf("%p\n", x+1);
    printf("%p\n", &x);
    printf("%p\n", &x+1);

    return 0;
}

On a 64bits architecture:

0x7fffe4a594d0
0x7fffe4a594d4
0x7fffe4a594d0
0x7fffe4a594e4