Array and Strings – Algebra – Problem #11
IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive
Difficulty: medium
Problem Statement
Consider two sets A and B containing a and b non-repeating integers respectively. Write a program which first reads two integers a and b. Assume a. b <100. The program then reads a and b number of integers and stores them in arrays A and B. The program should next print: i. The elements of union of sets A and B. (without repeating elements) ii. The elements of intersection of sets A and B. iii. The elements of A - B (i.e., the elements that are present in A but not in B).