Deepcopy: Difference between revisions
m
→Structures with pointers: Remove vanity tags
Thundergnat (talk | contribs) m (→{{header|C}}: Remove vanity tags) |
Thundergnat (talk | contribs) m (→Structures with pointers: Remove vanity tags) |
||
Line 184:
Structures with pointers which are usually used to represent data structures such as Linked lists, Stacks, Trees, Graphs etc. have to be copied element by element. A simple assignment as in the above example will not be a copy at all. It will be two pointers pointing towards the same memory location.
<lang C>
#include<stdlib.h>
#include<stdio.h>
|