[ create a new paste ] login | about

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

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

#define MAX 10

int main()
{
    int size = sizeof(int);
    int * pos = (int *) malloc (MAX*size);
    int i;
    for(i=0; i<MAX; i++)
    {
        printf("%d\n", pos+i);
    }
    free(pos);
    return 0;
}


Output:
1
2
3
4
5
6
7
8
9
10
164823160
164823164
164823168
164823172
164823176
164823180
164823184
164823188
164823192
164823196


Create a new paste based on this one


Comments: