#include
void fun(char a)
{
int n=0,i=0;
char *p=a;
while(*p=='')
{
p++;
n++;
}
while(*p!='/0')
{
a[i++]=*p;
p++;
}
for(;n>0;n--)
{
a[i++]='*';
}
a[i]=0;
}
main()
{char s[81]; int n=0; void NONO ();
printf("Enter a string:\n");gets(s);
fun(s);
printf("The string after moveing:\n");puts(s);
NONO();
}
void NONO ()
{
FILE *in, *out ;
int i ; char s[81] ;
in = fopen("in.dat","r");
out = fopen("out.dat","w");
for(i = 0 ; i < 10 ; i++) {
fscanf(in, "%s", s);
fun(s);
fprintf(out, "%s\n", s);
}
fclose(in);
fclose(out);
}
while(*p!='/0')
=>
while(*p!='\0')