摘要: #include <stdio.h> void fun( char *a, char *p ) { char *t=a; for(;t<=p;t++) if(*t!='*') *(a++)=*t; for(;*t!='\0';t++) *(a++)=*t; *a='\0'; } main() { c 阅读全文
posted @ 2023-03-25 14:36 cczxsy 阅读(89) 评论(0) 推荐(0)
摘要: 做第一个笔记记录一种是while(指针变量) /* char *str = "string"; while(*str) { ...(省略) str++; } */ while(*str) 的作用等同于 while(*str != ‘\0’)即就是当*str 不是结束符时。 还有一种情况,while( 阅读全文
posted @ 2023-03-25 14:31 cczxsy 阅读(198) 评论(0) 推荐(0)