commit 511bcbda0b7504654c7ab8a6bcd3e2580606e0c4 Author: baillyj Date: Thu Sep 8 13:57:35 2022 +0200 test diff --git a/exo1.c b/exo1.c new file mode 100644 index 0000000..3cb83d3 --- /dev/null +++ b/exo1.c @@ -0,0 +1,21 @@ +/* adresses virtuelles d'un processus */ +#include +#include +#include +#include +int t[1000] = {[0 ... 999] = 2}; +int main(int argc, char * argv[]) +{ + int i=3; + static int j = 3; + char * m = (char*)malloc(1); + printf("mon pid est %d\n\n",getpid()); + /* ------- Affichage des adresses --------*/ + printf("main\t=\t%p\n",main); + printf("&argc\t=\t%p\n",&argc); + printf("&i\t=\t%p\n",&i); + printf("&j\t=\t%p\n",&j); + printf("t\t=\t%p\n",t); + printf("m\t=\t%p\n",m); + getchar(); +}