Computer Science, asked by ak619823597819, 3 days ago

explain assign a structure variable to another structure variable​

Answers

Answered by oODivineGirlOo
0

Answer:

memcpy (dest_struct, source_struct, sizeof (*dest_struct)); dest_struct->strptr = strdup(source_struct->strptr); This will copy the entire contents of the structure, then deep-copy the string, effectively giving a separate string to each structure.

Similar questions