请编写一个函数fun(),它的功能是:找出一维数组元素中最大的值和它所在的下标,最大值和它所在的下标通过形参传回。数组元素中的值已在主函数中赋予。 主函数中x是数组名,n是x中的数据个数,max存放最大值,index存放最大值所在元素的下标。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。 试题程序: #include<stdlib.h> #include<stdio.h> void fun(int a[],int n, int *max,int *d) { } main() { int i, x[20], max, index, n=10; randomize(); for(i=0; i<=n; i++) { x[i]=rand()%50; printf("%4d",x[i]); /*输出一个随机数组*/ } printf("\n"); fun(x,n,&max,&index); printf("Max=%5d,Index=%4d\n",max,index); }
查看答案
监视居住最长不得超过十二个月。 ( )
A. 对
B. 错
For more than 50 years, AT&T has been a proud supporter of the arts. In fact, over the past decade alone, AT&T: On Stage has sponsored more than 60 world premieres of new plays or musicals in the United States, Canada and United Kingdom. Today, that tradition of presenting exciting new work continues with the opening of not one, but two plays on two of the most respected stages in New York City. On February 8th, TEN UNKNOWNS, the new play by Jon Robin Baitz, begins performances at Lincoln Center Theater, On February 16th, LOBBY HERO, the new play by Kebbeth Lonergan, premieres at Playwrights Korizons. Two highly respected playwrights. Two highly anticipated plays. Two nights in the theater that got their start with help of AT&T: On Stage. When will the hew play by Kebbeth Lonergan premiere at Playwrights Korizons
法律面前人人平等原则是我国《治安管理处罚法》所规定的重要原则。 ( )
A. 对
B. 错