有以下程序:
fun(int x)
{ int P;
if(x==0||x==l) return(3);
p=x-fun(x-2);
return p;
}
main
{printf("%d\n",fun(7));}
程序执行后的输出结果是()。
A.7
B. 3
C. 2
D. 0
有以下程序:
void swap(char*x,char*y)
{ char t;
t=*x;*x=*y;*y=t;
}
main
{ char*s1="abe",*s2="123":
swap(s1,s2);
printf("%s,%s\n",s1,s2);
}
程序执行后的输出结果是()。
A.123,abe
B. abc.123
C. 1bc,a23
D. 321,cba
有以下程序
#include<stdio.h>
struct tt
(int x;struct tt*y;)*P;
struct tt a[4]={20,a+1,15,a+2,30,a+3,17,a};
main
{ int i;
p=a;
for(i=l;i<=2;i++){printf("%d,",p->x);P =p->y;}
}
程序的运行结果是()。
A. 20,30,
B. 30,17,
C. 15,30,
D. 20,15,
下列程序的输出结果是()。
#include<stdio.h>
main
{ int i;
for(i=1;i<=10,i++)
{ if((i*i>=20)&&(i*i<=100))
break;
}
printf("%d\n",i*i;
}
A.49
B. 36
C. 25
D. 64