22问答网
所有问题
各位编程大神,问你们一道题,是关于C语言的程序设计:输入一个字符串,计算并输出它的长度!
如题所述
举报该问题
推荐答案 2014-11-19
#include<stdio.h>
#include<string.h>
void main()
{
char s[50];
int a;
gets(s);
puts(s);
a=strlen(s);
printf("%d",a);
}
温馨提示:答案为网友推荐,仅供参考
当前网址:
http://22.wendadaohang.com/zd/CXXTff0fh6S0ST26XX6.html
其他回答
第1个回答 2014-11-18
这个电脑没在旁边
追答
不好给你打
明天吧
追问
谢谢!
追答
嗯
第2个回答 2014-11-18
不是'\0'就++
相似回答
大家正在搜
相关问题
问一道C语言程序设计题,题目如下: 输入一个字符串,将其中的...
请问大神,C语言题,编程功能实现:输入一个字符串,输出字符串...
C语言程序设计:输入一个正整数输出字符串,大概就是这个意思,...
C++ 输入一个字符串,程序计算字符串的长度并输出。如输入c...
请用C语言设计一个程序:输入一个字符串,计算其长度。
c语言程序设计问题 输入一个字符串,删除字符串中的所有空格后...
C语言结构程序设计:输入一个字符,判断有多少个单词数。
任意输入一个字符串,输出其中数字字符之和。拜托各位C语言大神...