C语言之strlen字符串函数
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char add[20];
//输入
printf("请输入字符串的内容: \n");
gets(add);
int x=strlen(add);
printf("该字符串的长度是:%d\n", x);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char add[20];
//输入
printf("请输入字符串的内容: \n");
gets(add);
int x=strlen(add);
printf("该字符串的长度是:%d\n", x);
system("pause");
return 0;
}