这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » 软件与操作系统 » 关于指针的操作,你都明白吗?

共1条 1/1 1 跳转至

关于指针的操作,你都明白吗?

专家
2017-07-13 11:56:13     打赏
 #include<stdio.h>
    int main()
     {
            unsigned int a = 5, b;

            printf("&a=%x\n &b=%x\n", &a, &b);
            b = (unsigned int)&a;             
            printf("(unsigned int *)&b = %x\n", (unsigned int *)&b);                                 
           printf("(unsigned int *)b = %x\n", (unsigned int *)b);  
           printf("*(unsigned int *)b = %x\n", *(unsigned int *)b); 
          return 0; 
   }

 关于指针的操作,明白的写出你的答案!

——回复可见内容——

&a=ffe93154
 &b=ffe93150
(unsigned int *)&b = ffe93150
(unsigned int *)b = ffe93154
*(unsigned int *)b = 5


共1条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]