2079 11

CSC115 ยท 2079 ยท 5 marks

What is the advantage of the union over structure? List any four string library functions with the prototype.

What is the advantage of the union over structure? List any four string library functions with the prototype. [5]

C ProgrammingChapter 8: Structure and UnionUnion

The primary advantage of union over structure is memory efficiency. In a structure, each member is allocated its own separate memory space, so the total memory used is the sum of all members' sizes. In a union, all members share the same memory location. The compiler allocates memory equal to the...