Talk:Struct (C programming language): Difference between revisions

Content deleted Content added
SineBot (talk | contribs)
m Signing comment by 82.9.176.129 - "Incorrect statement: new section"
Line 56:
"The memory is already given and zeroed by just declaring a variable of that type regardless of member initialization"
 
Asigning to a new struct by value from another struct will create a copy with the same layout, but if the rvalue is only partially initialized, the lvalue will also be partially initialized. None of the uninitialized fields will be magically "zeroed". The exception to this is structs with static storage duration -- but in the example, the structs have ''automatic'' storage duration. <small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/82.9.176.129|82.9.176.129]] ([[User talk:82.9.176.129|talk]]) 23:21, 7 November 2014 (UTC)</small><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->