(12 ) 有以下程序
#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 " ,s ) ;}
程序运行后输入: abcdef< 回车 > ,则输出结果是 【 12 】 。