指针输入字符串后去掉*输出
#include <stdio.h>#include <stdlib.h>
int main()
{
char *x="dhbfd*rg*rg";
for(;*x!='/0';x++)
if(*x!='*')
printf("%c",*x);
return 0;
}
大佬们,为什么不对啊{:5_99:} 已解决
#include <stdio.h>
int main()
{
int i ;
char * x = "dhbfd*rg*rg" ;
for(; * x != '\0'; x ++) { ;
if(* x != '*') printf("%c" , * x) ;
}
}
页:
[1]