int A; int B = 0; int C = 2; staticint D; staticint E = 0; staticint F = 2; constint G = 5;
intmain() { int a; int b = 0; int c = 2; staticint d; staticint e = 0; staticint f = 2; constint g = 5; char char1[] = "abcde"; char *p = "1"; int *heap = malloc(sizeof(int) * 4); printf("PID is %d\n\n", getpid()); printf("int A A_addr:%p\n", &A); printf("int B = 0 B_addr:%p\n", &B); printf("int C = 2 C_addr:%p\n", &C); printf("static int D D_addr:%p\n", &D); printf("static int E = 0 E_addr:%p\n", &E); printf("static int F = 2 F_addr:%p\n", &F); printf("const int G = 5 G_addr:%p\n", &G); printf("int a a_addr:%p\n", &a); printf("int b = 0 b_addr:%p\n", &b); printf("int c = 2 c_addr:%p\n", &c); printf("static int d d_addr:%p\n", &d); printf("static int e = 0 e_addr:%p\n", &e); printf("static int f = 2 f_addr:%p\n", &f); printf("const int g = 5 g_addr:%p\n", &g); printf("char char1[] = abcd char1_addr:%p\n", char1); printf("char *p p_addr:%p\n", &p); printf("value of p p_value:%p\n", p);