c語言求字符串的長(zhǎng)度并輸出 C語言中用什么函數(shù)可以得到一個(gè)字符串的長(zhǎng)度?
C語言中用什么函數(shù)可以得到一個(gè)字符串的長(zhǎng)度?在C語言中,獲取字符串長(zhǎng)度的函數(shù)是:strlen(),例如:#include#includemain()](char*STR=“this is a test
C語言中用什么函數(shù)可以得到一個(gè)字符串的長(zhǎng)度?
在C語言中,獲取字符串長(zhǎng)度的函數(shù)是:strlen(),例如:
#include
#include
main()](
char*STR=“this is a test MSG”
printf(%dn”,strlen(STR))
getch())