以下程序调用findmax函数求数组中值最大的元素在数组中的下标 请补充填空。include <s

职业资格 中值,下标,数组 已帮助

以下程序调用findmax函数求数组中值最大的元素在数组中的下标,请补充填空。

#include <stdio.h>

void findmax (int *s ,int t ,int *k )

{

   int p;

   for(p=0,*k=p;p<t;p++ )

      if (s[p] > s[*k])     ①   ;

}

void main()

{

   int a[10] , i , k ;

   for (i=0 ; i<10 ; i + + ) scanf("%d",&a[i]);

    ②   ;

   printf ("%d,%d " , k , a[k] );

}                                                            

A、① *k=p+1 ② findmax(&a, 10, k)

B、① *k=p  ② findmax(a, 10, &k) 

C、① *k=p-1 ② findmax(a, 10, &k) 

D、① *k=p-1 ② findmax(&a, 10, k)


Fatal error: Uncaught [XSErrorException] ../../xunsearch/sdk/php/lib/XS.php(2563): fsockopen(): unable to connect to localhost:8384 (Connection refused)(2) thrown in /www/xunsearch/sdk/php/lib/XS.php on line 560