Sizeof vs Strlen
#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;
}
Resultado
o tamanho de setembro é 8 e o comprimento é 9
Existe algo errado com minha sintaxe ou o quê?