struct test {
  int foo1;
  int foo2[6];
};

struct test *ptrvar;

struct test s;

int main() {
  ptrvar[1] = s;

  memcpy(&ptrvar[0], &s, sizeof(s));
}


syntax highlighted by Code2HTML, v. 0.9.1