From 511bcbda0b7504654c7ab8a6bcd3e2580606e0c4 Mon Sep 17 00:00:00 2001 From: baillyj Date: Thu, 8 Sep 2022 13:57:35 +0200 Subject: [PATCH] test --- exo1.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 exo1.c 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(); +}