填空题
以下函数rotate的功能是:将a所指N行N列的二维数组中的最后一行放到b所指二维数组的第0列中,把a所指二维数组中的第0行放到b所指二维数组的最后一列中,b所指二维数组中其他数据不变。
#define N 4
void rotade (int a[][N],int b[][N])
int i,j;
for(i=0;i<N;i++)
b[i][N-1]=
【10】
;
【11】
=a[N-1][i];
【参考答案】
[10] a[0][i]
[11] b[i][0]
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
有以下程序段,且变量已正确定义和赋值 for(s=1.0,k=1;k<=n;k++)s=s+1.0 (k*(k+1)); printf( s=%f n n ,s); 请填空,使下面程序段的功能与之完全相同 s=1.0;k=1; while( 【8】 )s=s+1.0 (k*(k+1)); 【9】 ; printf( s=%f n n ,s);
点击查看答案&解析
填空题
下面程序的运行结果是 【13】 。 #include<stdio.h> #define SIZE 12 main() char s[SIZE];int i;for(i=0;i<SIZE;i++) s[i]=’A’+i+321; sub(s,7,SIZE-1); for(i=0;i<SIZE;i++) printf( %c ,s[i]); printf( n ); sub(char *a,int t1,int t2) char ch; while(t1<t1) ch=*(a+t1); *(a+t1)=*(a+t2); *(a+t2)=ch; t1++;t2--;
点击查看答案&解析
相关试题
mystrlen函数的功能是计算str所指字符串的...