(12 ) 有以下程序
#include
#include
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 ) ;}
程序運(yùn)行后輸入: abcdef< 回車 > ,則輸出結(jié)果是 【 12 】 。
你可能感興趣的試題
(11 )有以下程序
#include
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 " ) ;
}
程序運(yùn)行后的輸出結(jié)果是 【 11 】 。
單項(xiàng)選擇題
(35 )下面程序運(yùn)行時(shí),若輸入 “ Visual Basic Programming ” ,則在窗體上輸出的是
(35 )下面程序運(yùn)行時(shí),若輸入 “ Visual Basic Programming ” ,則在窗體上輸出的是
Private Sub Comand1_Click ()
Dim count (25 ) As Integer, ch As String
ch=U c ase (InputBox (" 請(qǐng)輸入字母字符串 " ) )
For k=1 To Len (ch )
n=Asc (Mid (ch,k,1 ) ) -Asc (" A " )
If n>=0 Then
Count (n ) =Count (n ) + 1
End If
Next k
m=count (0 )
For k=1 To 25
If m
m=count (k )
End If
Next k
Print m
End Sub
A ) 0
B ) 1
C ) 2
D ) 3