Created
October 16, 2018 00:12
-
-
Save hiramekun/8c49a515a61b13740026596478e7e7e9 to your computer and use it in GitHub Desktop.
mallocの動作確認
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
main() { | |
char *a = malloc(1000); | |
char *b = malloc(1000); | |
char *c = malloc(1000); | |
char *d = malloc(1000); | |
printf("a:%lu\n", a); | |
printf("b:%lu\n", b); | |
printf("c:%lu\n", c); | |
printf("d:%lu\n\n", d); | |
free(a); | |
char *e = malloc(1000); | |
printf("e:%lu\n", e); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment