单项选择题

有以下程序:
void swap(int *p,int q)
int t=0;
t=*p;p=&q;q=t;
void
main()
int a=7,b=8,*p,*q,*r;
p=&a;q=&b;
r=p; p=q;q=r;
swap(q,b);
printf("%d,%d,%d,%d\n",*p,*q,a,b);

程序运行后输出的结果是( )。

A.8,7,8,7
B.7,8,7,8
C.8,7,7,8
D.7,8,8,7
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: main() char k; int i; for(i=1;i<3;i++) scanf( %c ,&k); switch(k) case'0': priritf( %c n ,k++); case'1': printf( %c n ,k); 程序运行时,从键盘输入:01<回车>,程序执行后输出的结果是( )。
A.0
1
0
B.0
1
1
C.0
1
D.1
1
单项选择题
有以下计算公式: 若程序前面已在命令行中包含math.h文件,不能够正确计算上述公式的程序段是( )。
A.if(x>=0) y=sqrt(x); else y=sqrt(-x);
B.y=sqrt(x);
if(x<0) y=sqrt(-x);
C.if(x>=0)y=sqrt(x);
if(x<0) y=sqrt(-x);
D.y=sqrt(x>=0x:-x);
相关试题
  • 下面函数将指针p2所指向的线性链表串接到p...
  • 以下程序的运行结果是______。 # ...
  • 以下程序运行后输出的结果是______。...
  • 以下函数sstrcat()的功能是实现字符串的...
  • 已有定义如下: struct node int data...