填空题
以下程序运行后输入:3,abcde<回车>,则输出结果是【 】
#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
热门
试题
填空题
设函数findbig( )已定义为求3个数中的最大值。以下程序将利用函数指针调用findbig函数。请填空。main( ){ int findbig(int,int,int);int (*f)( ),x,y,z,big;f=【 】;scanf( %d%d%d ,&x,&y,&z);big=(*f)(x,y,z);printf( big=%d n ,big);}