#include <stdio.h>
#include <string.h>
typedef struct Animal {
char nome[6]; //se precisa de 5 caracteres o tamanho tem que ser 6 para acomodar o terminador
int idade;
} Cachorro;
int main() {
Cachorro dog;
dog.idade = 9;
strcpy(dog.
nome, "Salfr"); //esta é a forma correta pra copiar uma string para uma variável printf("'%s' '%d'", dog.
nome, dog.
idade); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCnR5cGVkZWYgc3RydWN0IEFuaW1hbCB7CiAgICBjaGFyIG5vbWVbNl07IC8vc2UgcHJlY2lzYSBkZSA1IGNhcmFjdGVyZXMgbyB0YW1hbmhvIHRlbSBxdWUgc2VyIDYgcGFyYSBhY29tb2RhciBvIHRlcm1pbmFkb3IKICAgIGludCBpZGFkZTsKfSBDYWNob3JybzsKCmludCBtYWluKCkgewogICAgQ2FjaG9ycm8gZG9nOwogICAgZG9nLmlkYWRlID0gOTsKICAgIHN0cmNweShkb2cubm9tZSwgIlNhbGZyIik7IC8vZXN0YSDDqSBhIGZvcm1hIGNvcnJldGEgcHJhIGNvcGlhciB1bWEgc3RyaW5nIHBhcmEgdW1hIHZhcmnDoXZlbAogICAgcHJpbnRmKCInJXMnICclZCciLCBkb2cubm9tZSwgZG9nLmlkYWRlKTsKICAgIHJldHVybiAwOwp9