#包括<stdio. h & gt;我要分享

#include<stdio.h> void main(){ void str

包括

关注次数: 227

下载次数: 0

文件大小: 650.00 B

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明:#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 ))


代码预览