中文说明:#include
void main(){
void strchange(char *p,int k)
int total(char *q)
int n
char a[10],*str1
str1=a
printf("请输入字符串:")
scanf(" s",str1)
n=total(str1)
strchange(str1,n)
printf(" s",str1)
print("
")
}
int total(char*q){
int j,sum=0
for(j=0 *q j++,q++)
sum=sum+1
return sum }
void strchange (char*q,int k){
int i,j,r
for(i=0,j=k-1 i<+j i++,j--){
r=*(q+i)
*(q+i)=*(q+j)
*(q+j)=r }
}-# include void main () (void strchange (char* p, int k) int total (char* q) int n char a [10],* str1 str1 = a printf ( " Please enter the string:" ) scanf ( " s" , str1) n = total (str1) strchange (str1, n) printf ( " s" , str1) print ( " n" ) ) int total (char* q ) (int j, sum = 0 for (j = 0 * q j++, q++) sum = sum+1 return sum ) void strchange (char* q, int k) (int i, j, r for (i = 0, j = k-1 i <+ j i++, j-) (r =* (q+ i) * (q+ i) =* (q
English Description:
# include
void main () (void strchange (char* p, int k) int total (char* q) int n char a [10],* str1 str1 = a printf ( " Please enter the string:" ) scanf ( " s" , str1) n = total (str1) strchange (str1, n) printf ( " s" , str1) print ( " n" ) ) int total (char* q ) (int j, sum = 0 for (j = 0 * q j++, q++) sum = sum+1 return sum ) void strchange (char* q, int k) (int i, j, r for (i = 0, j = k-1 i <+ j i++, j-) (r =* (q+ i) * (q+ i) =* (q+ j) * (q+ j) = r ))