12 record
copyrecord (record x
)
15 return copy
; /* 1. Released storage x.name reachable from parameter at ... */
18 record
copyrecord2 (record x
)
23 return copy
; /* 2. Released storage x.name reachable from parameter at ... */
26 record
copyrecord3 (record x
)
28 return x
; /* 3. Released storage x.name reachable from parameter at ... */
37 r
.name
= (char *) malloc (sizeof (char) * 100);
38 assert (r
.name
!= NULL
);
39 strcpy (r
.name
, "yo");
43 printf ("rc: %s", rc
.name
);
45 return r
.x
; /* 4. Only storage rc.name (type char *) derived from variable ... */