填空题
以下fun函数的功能是在N行M列的整型二维数组中,选出一个最大值作为函数值返回,请填空。(设M,N已定义)
int fun(int a[N][M])
int i,j,row=0,co1=0;
for(i=0;i<N;i++)
for(i=0;j<M;j++)
if(a[i][j]>a[row][co1])row=i;co1=j;
return
;
【参考答案】
a[row][co1]
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
以下程序中函数fun的功能是:构成一个如图所示的带头节点的单向链表,在节点的数据域中放入了具有两个字符的字符串。函数disp的功能是显示输出该单链表中所有节点中的字符串。请填空完成函数disp。 #include<stdio.h> typedef struct node *链表节点结构* char sub[3]; struct node*next; Node; Node fun(char s) *建立链表* … void disp(Node*h) Node*p; p=h->next; while______ printf( %s n ,p->sub); p=p->next; main() Node*hd; hd=fun(); disp(hd); printf( n );
点击查看答案&解析
填空题
以下程序的输出结果为______。 #define JFT(x) x*x main( ) int a,k=3; a=++JFT(k+1); printf( %d ,a);
点击查看答案&解析
相关试题
以下程序运行后的输出结果是 。 #includ...