各位编程大神,问你们一道题,是关于C语言的程序设计:输入一个字符串,计算并输出它的长度!

如题所述

#include<stdio.h>
#include<string.h>
void main()
{
char s[50];
int a;
gets(s);
puts(s);
a=strlen(s);
printf("%d",a);
}
温馨提示:答案为网友推荐,仅供参考
第1个回答  2014-11-18
这个电脑没在旁边追答

不好给你打

明天吧

追问

谢谢!

追答

第2个回答  2014-11-18
不是'\0'就++
相似回答