Размер против Стрлен
#include "stdio.h"
#include "string.h"
main()
{
char string[] = "october"; // october is 7 letters
strcpy(string, "september"); // september is 9 letters
printf("the size of %s is %d and the length is %d\n\n", string, sizeof(string), strlen(string));
return 0;
}
Выход:
размер сентября 8, а длина 9
Что-то не так с моим синтаксисом или как?