首页 > 试题广场 >

写出以下程序的运行结果:

[问答题]
写出以下程序的运行结果:

#include<stdio.h>

void fact1(int x[ ])

{  
    int t;

    t=x[0];  x[0]=x[1];    x[1]=t;

}

void fact2(int a,int b)

{  
    int t;

    t=a;     a=b;    b=t;

}

void  main()

{  
    int a[2]={1,5};

    int b[2]={1,5};

    fact2(b[0],b[1]);
    fact1(a);

    printf("a: %d %d\n",  a[0],a[1]);

    printf("b: %d %d\n",  b[0],b[1]);

}

这道题你会答吗?花几分钟告诉大家答案吧!