在C语言中,可以使用strlen()函数来计算一个char数组的长度。strlen()函数会返回一个整数,表示数组中的字符数量,但不包括字符串末尾的空字符\0。下面是一个示例: #include <stdio.h> #include <string.h> int main() { char str[] = "Hello"; int length = strlen(str); printf("The length of the c...