• 2021-04-14
    写出下列程序运行结果
    #include “stdio.h”
    void swap(int *px , int *py );
    void main()
    {
    int a,b;
    a=5;
    b=10;
    printf(“ before swap a=%d, b=%d
    ”,a,b);
    swap(&a,&b);
    printf(“after swap a=%d, b=%d
    ”,a,b);
    }
    voidswap(int *px , int *py )
    {
    int temp;
    temp=*px;
    *px=* py;
    *py=temp;
    printf(“ in swap x=%d,y=%d
    ”,*px, *py);
    }