为什么声明了int型的变量并且直接初始化后,int型变量的地址一直在变化?

 1 /*************************************************************************
 2     > File Name: ptr_variable.c
 3     > Author: Mr.Yang
 4     > Purpose:演示指向变量的指针 
 5     > Created Time: 2017年06月03日 星期六 08时47分33秒
 6  ************************************************************************/
 7 
 8 #include <stdio.h>
 9 #include <stdlib.h>
10 
11 int main(void)
12 {
13         int a = 1000;
14         printf("a的地址为:%d\n",&a);
15 
16         char *p;
17         puts(p);
18         printf("指针p的地址为:%d\n",&p);
19 
20         return 0;
21 }

执行结果:

这个地址的变应该怎么理解,对于没有初始化的变量来说,地址变可以理解,但已经初始化的变量地址还是一直变,应该怎么理解呢?

posted @ 2017-06-03 09:55  杨来  阅读(761)  评论(1编辑  收藏  举报