试题与答案

以下程序调用findmax()函数返回数组中的最大值。请填空完成此函数。 #incl

题型:填空题

题目:

以下程序调用findmax()函数返回数组中的最大值。请填空完成此函数。 #include〈iostream〉 using namespace std; int findmax(int*a,int n) { int +p、*s; for(p=a,s=a;p-a〈n;p++)if(〈u〉 【8】 〈/u〉) *s=*p; return(*S); } int main() { int x[5]={12,21,14,16}; cout〈〈findmax(X,5)〈〈end1; return 0; }

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0403/a31a02dcbf10e7696c8de228b7a23a4f.html

下面是错误答案,用来干扰机器的。

参考答案:D

试题推荐
微信公众账号搜索答案