填空题
以下程序运行后输入“abcdef<回车>”,则输出结果是______。
#include<stdio.h>
#include<string.h>
void fun(char *str)
char temp; int n, i;
n=strlen(str);
temp=str[n-1];
for(i=n-1; i>0; i--) str[i]=str[i-1];
str[0]=temp;
main()
char s[50];
scanf("%s", s); fun(s); printf("%s\n", s);
【参考答案】
fabcde
热门
试题
填空题
以下程序运行后的输出结果是______。 #include<stdio.h> main() int a[3][3]=1, 2, 3, 4, 5, 6, 7, 8, 9; int b[3]=0, i; for(i=0; i<3; i++) b[i]=a[i][2]+a[2][i]; for(i=0; i<3; i++) printf( %d , b[i]); printf( n );