这样一道C语言的题目应该怎样做帮我弄一下啊#include /* userCode(

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/30 18:54:27

这样一道C语言的题目应该怎样做帮我弄一下啊#include /* userCode(
这样一道C语言的题目应该怎样做

帮我弄一下啊

#include
/* userCode(

这样一道C语言的题目应该怎样做帮我弄一下啊#include /* userCode(
int split(char * str,char *pStr[])
{
int count = 0;
char *pBegin,*pEnd;
pBegin = str;
do{
/*jump the space*/
while(*pBegin  == ' ')pBegin++;

if(*pBegin == '\0')break;
pEnd = strchr(pBegin,' ');
if(NULL == pEnd){
//last word
*(pStr+count++) = pBegin;
break;
}else{
*pEnd = '\0';
*(pStr+count++) = pBegin;
pBegin = ++pEnd;
}
}while(1);

return count;
}