.
{
int i ,length; char tmp;
length = strlen( s );
for (i = 0;i < length / 2; i++) {
tmp = s[i];
s[i] = s[length - i - 1]; s[length - i - 1] = tmp; } }
void main( ) { char a[N];
printf ( \ printf ( \ fun ( a ); printf(\
printf ( \ puts ( a ); }
43、编写程序,依次取出字符串s1中所有数字字符,形成新的字符串s2。
#include
.
.
void fun(char *s) {
int i,j;
for(i=0,j=0; s[i]!='\\0'; i++) if(s[i]>='0' && s[i]<='9')
s[j++]=s[i]; s[j]='\\0';
}
void main() {
char item[80];
printf(\ printf(\ fun(item);
printf(\string \\\}
.
of changing is :