Yes if the structure is of the same type. Think it as a memory copy.
More Related Contents:
- Access violation reading data from binary file into struct in C
- typedef struct vs struct definitions [duplicate]
- How to initialize a struct in accordance with C programming language standards
- Difference between a Structure and a Union
- Pointer to pointer of structs indexing out of bounds(?) when I try to index anything other than zero
- C – function inside struct
- Passing struct to function
- Why can’t we initialize members inside a structure?
- C typedef of pointer to structure
- Are C-structs with the same members types guaranteed to have the same layout in memory?
- C : typedef struct name {…}; VS typedef struct{…} name;
- Why does “typdef struct { struct S *s; } S;” containing a pointer to same type compile?
- Are “malloc(sizeof(struct a *))” and “malloc(sizeof(struct a))” the same?
- What does “request for member ‘*******’ in something not a structure or union” mean?
- How is the result struct of localtime allocated in C?
- How to initialize a structure with flexible array member
- memcpy vs assignment in C
- what is the difference between struct {0} and memset 0 [duplicate]
- Why declare a struct that only contains an array in C?
- How to include a dynamic array INSIDE a struct in C?
- Initializing a struct to 0
- Anonymous union within struct not in c99?
- C Typedef – Incomplete Type
- How do you use offsetof() on a struct?
- How does C return a structure? [duplicate]
- Returning a struct pointer
- C initialize array within structure
- offsetof at compile time
- Iterating over same type struct members in C
- How can I malloc a struct array inside a function? Code works otherwise