struct Cat {
char *name;
unsigned int id;
double weight, length;
unsigned int mice_caught;
};
struct Cat c;
size_t N = 100;
char s[] = "Tom";
c.name = (char*) malloc(N * sizeof(char)); /* sizeof(char) - это уже для педантов */
strncpy(c.name, s, N);