You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <assert.h>
|
|
|
|
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);
|
|
}
|