Assign one struct to another in C -
can assign 1 instance of struct another, so:
struct test t1; struct test t2; t2 = t1;
i have seen work simple structures, bu work complex structures?
how compiler know how copy data items depending on type, i.e. differentiating between int
, string?
yes if structure of same type. think memory copy.
Comments
Post a Comment