1 2 3 4

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;
}

posted on 2020-12-10 22:24  三日坊主i  阅读(120)  评论(0)    收藏  举报

导航