struct test { int foo1; int foo2[6]; }; struct test *ptrvar; struct test s; int main() { ptrvar[1] = s; memcpy(&ptrvar[0], &s, sizeof(s)); }