首页 > 职业考试题库1 > 题目详情
有以下程序#include <stdio.h>void fun(int a[],
题目内容:
[单选题]有以下程序
#include <stdio.h>
void fun(int a[], int n)
{ int i,t;
for(i=0;i<n/2;i++) { t=a[i]; a[i]=a[n-1-i]; a[n-1-i]=t; }
}
main()
{ int k[10]={1,2,3,4,5,6,7,8,9,10},i;
fun(k,5);
for(i=2;i<8;i++) printf("%d",k[i]);
printf("/n");
}
程序的运行结果是
A.)345678
B.)876543
C.)1098765
D.)321678
本题链接: