#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct test {
        void *ptr;
        char str[300];
};
struct test2 {
        int i;
        char astr[200];
};

int main(void)
{
        struct test *p;
        p = malloc(sizeof(struct test));
        p->ptr = malloc(sizeof(struct test2));
		strcpy(((struct test2 *)(p->ptr))->astr, "hello world");
		printf("%s\n", ((struct test2 *)(p->ptr))->astr);
		return 0;
}