达柳斯莫里斯吧 关注:119贴子:3,671
  • 3回复贴,共1
#include<stdio.h>
int main()
{


1楼2017-12-27 11:19回复
    #include<stdio.h>
    int main()
    {
    int a;
    int *pa=&a;
    a=10;
    printf("a:%d\n",a);
    printf("*pa:%d\n",*pa);
    printf("&a:%x(hex)\n",&a);
    printf("pa:%x(hex)\n",pa);
    printf("&pa:%x(hex)\n",&pa);
    }


    2楼2017-12-27 11:20
    回复
      #include<stdio.h>
      int main()
      {
      int father=1;
      int baby=2;
      int *sturoom,*bedroom;
      int *dd=&father;
      sturoom=dd;
      bedroom=&baby;
      printf("爸爸所在的地址为:%x\n",sturoom);
      printf("宝宝所在的地址为:%x\n",bedroom);
      printf("爸爸;%d\n",*sturoom);
      printf("宝宝:%d\n",*bedroom);
      return 0;
      }


      3楼2017-12-27 11:20
      回复
        #include<stdio.h>
        int main()
        {
        int *p1,*p2,*p,a,b;
        scanf("%d,%d",&a,&b);
        p1=&a;p2=&b;
        if(a<b)
        {
        p=p1;p1=p2;p2=p;
        }
        printf("a=%d,b=%d\n",a,b);
        printf("max=%d,min=%d\n",*p1,*p2);
        }


        4楼2017-12-27 11:21
        回复