Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv){
int hoge[10];
int *fuga;
fuga = malloc(1);
printf("hoge address = %p\n", hoge);
printf("fuga address = %p\n", fuga);
free(fuga);
return 0;
}
//実行結果
hoge address = 0x7fff539799f0
fuga address = 0x7fca11404c70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment