aboutsummaryrefslogtreecommitdiffstats
path: root/callocing.c
blob: 28f9c12267756c70aa7a96ae72f7c39ee95a317c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Deja-vu?
#include<stdio.h>
#include<stdlib.h>

int main() {
    int *ptr;
    ptr = malloc(1024 * 1048576 * sizeof(char));
//    int array[100];
    int i;
    for (i = 0; i < 100; i++) {
        printf("%d: %d\n", i, *(ptr + i));
    }
    printf("\n%d\n", ptr);
    free(ptr);
    return 0;
}