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;
}
Salida
el tamaño de septiembre es 8 y la longitud es 9
Hay algún problema con mi sintaxis o qué?