以下程序调用findmax函数返回数组中的最大值 findmax(int *a,int n) { int *p,*s; for(p=a,s=a;p-a<n; p++) if (______)s=p;

admin2009-02-15  29

问题 以下程序调用findmax函数返回数组中的最大值    findmax(int *a,int n)    { int  *p,*s;      for(p=a,s=a;p-a<n;  p++)         if  (______)s=p;         return(*s);    }    main()    {  int  x[5]={12,21,13,6,18};       printf("%d\n",findmax(x,5));    }    在下划线处应填入的是(    )

选项 A、p>s
B、*p>*s
C、a[p]>a[s]
D、p-a>p-s

答案2

解析
转载请注明原文地址:https://kaotiyun.com/show/OXXp777K
0

最新回复(0)