[Solved] Is it possible to assign a entire struct using a pointer and one statement


This example assigns a struct using a pointer and one statement.

int main(void) {

    struct Foo {
        char a;
        int b;
        double c;
    } *foo, *bar;

    foo->b = 10;
    bar = foo; /* now  bar->b=10 as well */
}

solved Is it possible to assign a entire struct using a pointer and one statement