C语言中char a[]=("I am a student")的字符串长度

2025-12-18 03:21:54
推荐回答(1个)
回答1:

长度是15

sizeof计算结果是15
strlen计算结果是14

但是在字符串中'\0'也是字符串的一部分,所以,字符串长度是15