填空题

下面程序的运行结果是 【18】 。
void swap(int *a,int *b)
int *tp;
t=a;a=b;b=t;
main()
int x=3,y=5,*p=&x,*q=&y;
swap(p,q);
printf("%d%d\n",*p,*q);

【参考答案】

3 5
<上一题 目录 下一题>
热门 试题

填空题
以下程序的输出结果是 【17】 。 int fun(int *x,int n) if(n==0) return x[0]; else return x[0]+fun(x+1,n-1); main() int a[]=1,2,3,4,5,6,7; printf( %d n ,fun(a,3));
填空题
以下函数sstrcat()的功能是实现字符串的连接,即将t所指字符串复制到s所指字符串的尾部。例如:s所指字符串为abed,t所指字符串为efgh,函数调用后s所指字符串为abodefgh。请填空。 #include <string.h> void sstrcat(char *s,char *t) int n; n=strlen(s); while(*(s+n)= 【13】 )s++;t++;
相关试题
  • 有以下程序,其功能是:以二进制“写”方式...
  • 下面程序的功能是建立一个有3个结点的单循...