填空题 C语言
题号 #143936

以下程序运行后输入:3,abcde<回车>,则输出结果是(17)  
#include  
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

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考