struct mystruct a = b; Is this valid? Direct assignment of structure variables, is it valid in C?
===

I have the following code.

    struct rectangle {
    int length;
    int breadth;
    };
    
    void main () 
    {
        struct rectangle a,b;
        a.length = 10;
        a.breadth = 5;
       
        b=a;  
    }



 **Is the above assignment a valid statement?(b=a)** I did it this way inside my project. I got a **review comment** stating, **this type of assignment is wrong and i should have done used memcpy**. I printed the values of b and checked. The values are correct. I was wondering why the above assignment is wrong? **If it is wrong what happens when you pass a structure variable to a function and catch it in a separate variable?** I hope i am clear on my question. Please get back to me if i am unclear on my question.
