[ create a new paste ] login | about

Link: http://codepad.org/MKioBYyJ    [ 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(char);
    char * pos = (char *) 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
138604664
138604665
138604666
138604667
138604668
138604669
138604670
138604671
138604672
138604673


Create a new paste based on this one


Comments: