指针理解

 1 # include <stdio.h>
 2 
 3 int main(void)
 4 {
 5     
 6     int i = 5;
 7     int * p;
 8     int * q;
 9     p = &i;  
10     q=p;      //注意:不能写成*q=p;或者*q=*p或者p=q;
11     
12     printf("*q = %d, q = %d\n",*q,q);
13     
14     return 0;
15 }

posted on 2012-09-03 13:02  Your Song  阅读(145)  评论(0编辑  收藏  举报

导航