以下程序调用fun函数求数组中最大值所在元素的下标。#include<stdio.h>voidfun(int*s,intn,int*k){inti;for(i=0,*k=i;i<n;i++)if(s>s[*k])_()}intmain(){inta[5]={1,8,3,6,9},k;fun(a,5,&k);printf(“%d,%d\n”,k,a[k]);return0;}
以下程序调用fun函数求数组中最大值所在元素的下标。#include<stdio.h>voidfun(int*s,intn,int*k){inti;for(i=0,*k=i;i<n;i++)if(s>s[*k])_()}intmain(){inta[5]={1,8,3,6,9},k;fun(a,5,&k);printf(“%d,%d\n”,k,a[k]);return0;}
A.*k=i;
B.k=i;
C.*k=i-s;
D.k=i-s;
正确答案:A