Question: Union and Intersection of two sets: A set is a collection of similar elements. A union of two sets A and B is a set
Union and Intersection of two sets: A set is a collection of similar elements. A union of two
sets A and B is a set of elements in which each element belongs to set A set B or both. It is
represented as A U B
For example:
A
B
then A U B
The intersection of two sets A and B is a set of elements in which each element belongs to
both sets A and B It is represented as A Lambda B
For example
A
B
Then A Lambda B
Write a function in c language that takes the following parameters:
Four input parameters : Set A and its size, and the set B and its size.
Four output parameters : Intersect set and its size, Union set and its size
The function should return two arrays and their sizes as output. One array holds the
union of array A and B and the other holds the intersection of the two sets.
Test you program by writing a main function and passing array A and B
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
