单项选择题

以下程序的输出结果是( )。
void fun(int *a, int i, int j)
int t;
if(i<j)
t=a[i]; a[i]; a[j]; a[j]=t;
i++; j--;
fun(a, i, j);

main()
int x[3=2, 6, 1, 8), i;
fun(x, 0, 3);
for(i=0; i<4; i++)printf("%2d", x[i]);
printf("\n");

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

单项选择题
有以下程序: #include<stdio.h> void WriteStr(char *fn, char *str) FILE *fp; fp=fopen(fn, w ); fputs(str, fp); fclose(fp); main() WriteStr( t1.dat , start ); WriteStr( t1.dat , end ); 程序运行后,文件t1. dat中的内容是( )。
A.start
B.end
C.startend
D.endrt
单项选择题
有以下程序: #include<stdio.h> main() char c1, c2, c3, c4, c5, c6; scanf( %c%c%c%C , &c1, &c2, &c3, &c4); c5=getchar(); c6=getchar(); putchar(c1); putehar(c2); printf( %c%c n , c5, c6); 程序运行后,若从键盘输入(从第1列开始) 123<回车> 45678<回车> 则输出结果是( )。
A.1267
B.1256
C.1278
D.1245
相关试题
  • a[i]
  • &a[i]
  • 下列程序的输出结果是______。 #in...
  • 下面函数的功能是将一个字符串的内容颠倒过...
  • 下列程序的运行结果是______。 main...