#include<stdio.h>
#include<string.h>
void nixu(char* num);
int main(void)
{
char num[100];
printf("请输入字符串:");
gets_s(num);
nixu(num);
return 0;
}
void nixu(char* num)
{
int i;
i = strlen(num);
printf("长度为%d", i);
}
Write a function to find the length of the string, input the string in the main function, and output its length
Guess you like
Origin blog.csdn.net/winds_tide/article/details/108208034
Recommended
Ranking