當前位置:成語大全網 - 書法字典 - C語言中用什麽函數可以得到壹個字符串的長度?

C語言中用什麽函數可以得到壹個字符串的長度?

C語言中獲取字符串長度的函數是:strlen(),例如:

# include & ltstdio.h & gt

# include & ltstring.h & gt

主()

char *str= "這是壹條測試消息";

printf("%d\n ",strlen(str));

getch();

)