代码语言:javascript复制
#include<stdio.h>
#include<assert.h>
int fun(const char* str)
{
assert(str != NULL);
const char* p = str;
int count = 0;//计数器
while(*p != '