填空题

以下程序运行后输入3,abcde<回车>,则输出结果是 【19】 。
#include<string.h>
move (char *str,int n)
char temp;int i;
temp=str[n-1];
for(i=n-1;i>0;i--) str[i]=str[i-1];
str[0]=temp;
main()
char s[50]; int n,i,z;
scanf("%d,%s",&n,s);
z=strlen(S);
for(i=1;i<=n;i++) move(s,z);
printf("%s\n",s);

【参考答案】

cdeab
<上一题 目录 下一题>
热门 试题

填空题
设有以下结构体类型: struct st char name[8]; int num; float s[4]; student[50]; 并且结构体数组student中的元素都已有值,若要将这些元素写到硬盘文件fp中,请将以下fwrite语句补充完整: fwrite(student, 【20】 ,1,fp);
填空题
fun函数的功能是:首先对a所指的N行N列的矩阵,找出各行中的最大数,再求这N个最大值中最小的那个数并作为函数值返回。请填空。 #include <stdio.h> #define N 100 int fun(int(*a)[N]) int row,col,max,min; for(row=0;row<N;row++) for(max=a[row] [0],col=1;col<N;col++) if( 【13】 )max=a[row][col]; if(row==0)min=max; else if( 【14】 )min=max; return min;
相关试题
  • 有以下程序 main() char a1='M',a...
  • 有以下程序: main() unsigned char ...
  • 有以下程序: main() int i=1,j=...
  • 若有如下程序: main() int x=9,y...
  • 有以下程序: struct s int x,y;) ...