diff options
author | EliteTK <tomasz.kramkowski@gmail.com> | 2014-02-24 21:03:53 +0000 |
---|---|---|
committer | EliteTK <tomasz.kramkowski@gmail.com> | 2014-02-24 21:03:53 +0000 |
commit | be9d9aedb53e9b3211765f16bf4b90f5d31c1722 (patch) | |
tree | f9368e8a880abf9b9392d631da1e5a373c23dc7e /callocing.c | |
parent | de4075f451a2d6e457dbf9dff714d166618c4495 (diff) | |
download | c-stuff-be9d9aedb53e9b3211765f16bf4b90f5d31c1722.tar.gz c-stuff-be9d9aedb53e9b3211765f16bf4b90f5d31c1722.tar.xz c-stuff-be9d9aedb53e9b3211765f16bf4b90f5d31c1722.zip |
Added all files
Diffstat (limited to 'callocing.c')
-rw-r--r-- | callocing.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/callocing.c b/callocing.c new file mode 100644 index 0000000..404b1af --- /dev/null +++ b/callocing.c @@ -0,0 +1,15 @@ +#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; +} |