- intstrlen(constchar*str){assert(str!=NULL);intlen=0;while((*str++)!=‘\0′)len++;returnlen;}第二种方法:intstrlen(constchar*str){assert(str);constchar*p=str;while(*p++);/*useaddressestocountthelengthofstr*/returnp–str–1;}第三种方...
- 31975