Question: We sometimes use arrays to represent sets. For example S = {'b', 'f, 'z', 'a'} is represented by the following array: You can use zero

We sometimes use arrays to represent sets. For example S = {'b', 'f, 'z', 'a'} is represented by the following array: You can use zero as a character, 'O', when an entry does not have any data. For example if we store S in an array of size 6: You can assume that arrays have a maximum size: 30 Write a C program that takes two arrays containing alphabetical characters and computes the following operations: Union of the two arrays and output the result in a new array Intersection of two arrays and output the result in a new array, Is a set empty? Pleases note that you would an array to store the result that has twice the dimension of each array. If your input arrays have a dimension n, the resulting array should have 2n dimension. (a) Write a pseudocode for this program (b) Implement your pseudocode in C. (c) Test You program using the following code: a. Input two sets where all the elements are the same. b. Input two sets that have different elements c. One input empty set
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
