#include struct test { int foo; }; typedef struct test test_t; int main(int argc, char *argv[]) { test_t a = { 23 }; test_t b = { 42 }; a = b; assert(a.foo == 42); assert(b.foo == 42); a.foo = 69; assert(a.foo == 69); assert(b.foo == 42); }