struct foo { int a; char *b; } struct foo *p = malloc(sizeof (struct foo) + 100); p->b[50] = 'x'; ... free(p);
Test