输入长度小于100的字符串,输出这个字符串中有效字符个数。并且在main函数中调用

输入长度小于100的字符串,输出这个字符串中有效字符个数。并且在main函数中调用

<pre t="code" l="cpp">#include <stdio.h>
void fun(char *s)
{
scanf("%s",s);
printf("%s\n", s);
}
int main()
{
char str[100];
fun(str);
return 0;
}
温馨提示:答案为网友推荐,仅供参考
相似回答