谁能帮忙解释一下下面这段程序的执行结果啊?
程序代码:
#include <stdio.h> #include <string.h> int main() { char str1[] = {'a', 'b', 'c', 'd', 'e'}; char str2[5] = {'a', 'b', 'c', 'd', 'e'}; char* str3 = "abcde"; printf("str1=%s, length=%d, sizeof(str1)=%d\n", str1, strlen(str1), sizeof(str1)); printf("str2=%s, length=%d, sizeof(str2)=%d\n", str2, strlen(str2), sizeof(str2)); printf("str3=%s, length=%d, sizeof(str3)=%d\n", str3, strlen(str3), sizeof(str3)); return 0; }[local]1[/local]